Package org.ddogleg.rand
Class MultivariateGaussianDraw
java.lang.Object
org.ddogleg.rand.MultivariateGaussianDraw
Draw a number from a multivariate Gaussian distribution.
-
Constructor Summary
ConstructorDescriptionMultivariateGaussianDraw
(Random rand, DMatrixRMaj mean, DMatrixRMaj cov) Creates a random distribution with the specified mean and covariance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignMean
(DMatrixRMaj mean) Uses the referenced variable as the internal mean.double
next
(DMatrixRMaj x) Makes a draw on the distribution and stores the results in parameter 'x'
-
Constructor Details
-
MultivariateGaussianDraw
Creates a random distribution with the specified mean and covariance. The references to the variables are not saved, their value are copied.- Parameters:
rand
- Used to create the random numbers for the draw.mean
- If not null this will be the mean of the distribution, if null then nothing is assigned. this is useful if someone is being anal about performance and will soon call assignMean()cov
- The covariance of the distribution
-
-
Method Details
-
assignMean
Uses the referenced variable as the internal mean. This does not perform a copy but actually points to the specified matrix as the mean. -
next
Makes a draw on the distribution and stores the results in parameter 'x' -
computeLikelihoodP
public double computeLikelihoodP()
-