Class MultiVariateGaussian
java.lang.Object
solvers.queueingnet.montecarloLogistic.distributions.MultiVariateGaussian
- All Implemented Interfaces:
MultiVariateRealDistribution
Multivariate Gaussian distribution. Implements the MVRD interface. Specified
by a mean vector, covariance matrix and optionally an integer seed
-
Constructor Summary
ConstructorsConstructorDescriptionMultiVariateGaussian(double[] mean, double[][] cov) Constructor MVG with default seed = 0MultiVariateGaussian(double[] mean, double[][] cov, int seed) Full constructor.Copy constructorMultiVariateGaussian(MultiVariateGaussian MVG, int seed) Copy constructor with different seed -
Method Summary
Modifier and TypeMethodDescriptioncopy()required interface to copy distribution objectcopy(int seed) copy distribution with specified integer seeddouble[][]intgetDim()double[]getMean()double[]Get sample from this distribution.doublepdf(double[] point) pdf of specified point in this distribution
-
Constructor Details
-
MultiVariateGaussian
Full constructor. Requires that covariance is square, and mean has same length as rows/cols on covariance. Requires that the covariance is symmetric, and positive definite- Parameters:
mean- double array representing vector of meancov- covariance matrixseed- integer seed- Throws:
InternalErrorException
-
MultiVariateGaussian
Constructor MVG with default seed = 0- Parameters:
mean- mean vectorcov- covariance- Throws:
InternalErrorException
-
MultiVariateGaussian
Copy constructor- Parameters:
MVG- MVG to copy from- Throws:
InternalErrorException
-
MultiVariateGaussian
Copy constructor with different seed- Parameters:
MVG- MVG to copy fromseed- specified integer seed- Throws:
InternalErrorException
-
-
Method Details
-
copy
Description copied from interface:MultiVariateRealDistributionrequired interface to copy distribution object- Specified by:
copyin interfaceMultiVariateRealDistribution- Returns:
- a MVRD
- Throws:
InternalErrorException
-
copy
Description copied from interface:MultiVariateRealDistributioncopy distribution with specified integer seed- Specified by:
copyin interfaceMultiVariateRealDistribution- Parameters:
seed- integer to seed the distribution with- Returns:
- a copy of the distribution, with a different seed
- Throws:
InternalErrorException
-
getDim
public int getDim()- Specified by:
getDimin interfaceMultiVariateRealDistribution
-
getMean
public double[] getMean() -
getCovariance
public double[][] getCovariance() -
pdf
Description copied from interface:MultiVariateRealDistributionpdf of specified point in this distribution- Specified by:
pdfin interfaceMultiVariateRealDistribution- Parameters:
point- point to evaluate pdf at- Returns:
- double which is the pdf
- Throws:
InternalErrorException
-
getSample
public double[] getSample()Description copied from interface:MultiVariateRealDistributionGet sample from this distribution. Since it is multivariate, return type is an array- Specified by:
getSamplein interfaceMultiVariateRealDistribution- Returns:
- double array - sample from this distribution
-