org.ddogleg.rand
Class MultivariateGaussianDraw
- java.lang.Object
-
- org.ddogleg.rand.MultivariateGaussianDraw
-
public class MultivariateGaussianDraw extends java.lang.ObjectDraw a number from a multivariate Gaussian distribution.
-
-
Constructor Summary
Constructors Constructor and Description MultivariateGaussianDraw(java.util.Random rand, org.ejml.data.DenseMatrix64F mean, org.ejml.data.DenseMatrix64F cov)Creates a random distribution with the specified mean and covariance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidassignMean(org.ejml.data.DenseMatrix64F mean)Uses the referenced variable as the internal mean.doublecomputeLikelihoodP()org.ejml.data.DenseMatrix64Fnext(org.ejml.data.DenseMatrix64F x)Makes a draw on the distribution and stores the results in parameter 'x'
-
-
-
Constructor Detail
-
MultivariateGaussianDraw
public MultivariateGaussianDraw(java.util.Random rand, org.ejml.data.DenseMatrix64F mean, org.ejml.data.DenseMatrix64F cov)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 Detail
-
assignMean
public void assignMean(org.ejml.data.DenseMatrix64F mean)
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
public org.ejml.data.DenseMatrix64F next(org.ejml.data.DenseMatrix64F x)
Makes a draw on the distribution and stores the results in parameter 'x'
-
computeLikelihoodP
public double computeLikelihoodP()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG