Class MultivariateGaussianDraw

java.lang.Object
org.ddogleg.rand.MultivariateGaussianDraw

public class MultivariateGaussianDraw
extends Object
Draw a number from a multivariate Gaussian distribution.
  • Constructor Details

    • MultivariateGaussianDraw

      public MultivariateGaussianDraw​(Random rand, DMatrixRMaj mean, DMatrixRMaj 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 Details

    • assignMean

      public void assignMean​(DMatrixRMaj 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 DMatrixRMaj next​(DMatrixRMaj x)
      Makes a draw on the distribution and stores the results in parameter 'x'
    • computeLikelihoodP

      public double computeLikelihoodP()