I wonder why `MultivariateNormal::new` need for `Vec<f64>`
chatblanc-ciel opened this issue · comments
Kazuki Matsumoto commented
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?