statrs-dev / statrs

Statistical computation library for Rust

Home Page:https://docs.rs/statrs/latest/statrs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I wonder why `MultivariateNormal::new` need for `Vec<f64>`

chatblanc-ciel opened this issue · comments

I thinking using nalgebra's vector and matrix is good.
For example,

fn new_from_nalgebra(mean :nalgebra::DVector<f64>, cov :nalgebra::DMatrix<f64>) -> statrs::Result<Self> {
/* here is not necessary
        let mean = DVector::from_vec(mean);
        let cov = DMatrix::from_vec(mean.len(), mean.len(), cov);
*/
        let dim = mean.len();
        // Check that the provided covariance matrix is symmetric
// omitted others

What do you think about this?