nalgebra-mvn 0.2.0

Multivariate normal distribution using nalgebra
docs.rs failed to build nalgebra-mvn-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: nalgebra-mvn-0.14.0

nalgebra-mvn

Multivariate normal distribution using nalgebra.

Example of usage

use nalgebra::{ Vector2, Matrix2, MatrixMN, U2, U3};
use nalgebra_mvn::MultivariateNormal;

// specify mean and covariance of our multi-variate normal
let mu = Vector2::from_row_slice(&[9.0, 1.0]);
let sigma = Matrix2::from_row_slice(
    &[1.0, 0.0,
    0.0, 1.0]);

let mvn = MultivariateNormal::from_mean_and_covariance(&mu, &sigma).unwrap();

// input samples are row vectors vertically stacked
let xs = MatrixMN::<_,U3,U2>::new(
    8.9, 1.0,
    9.0, 1.0,
    9.1, 1.0,
);

// evaluate the density at each of our samples.
let result = mvn.pdf(&xs);

// result is a vector with num samples rows
assert!(result.nrows()==xs.nrows());

License

Licensed under either of

at your option.

License: MIT/Apache-2.0