Class AbstractMultivariateRealDistribution
java.lang.Object
org.hipparchus.distribution.multivariate.AbstractMultivariateRealDistribution
- All Implemented Interfaces:
 MultivariateRealDistribution
- Direct Known Subclasses:
 MixtureMultivariateRealDistribution,MultivariateNormalDistribution
public abstract class AbstractMultivariateRealDistribution
extends Object
implements MultivariateRealDistribution
Base class for multivariate probability distributions.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RandomGeneratorRNG instance used to generate samples from the distribution. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMultivariateRealDistribution(RandomGenerator rng, int n) Simple constructor. - 
Method Summary
Modifier and TypeMethodDescriptionintGets the number of random variables of the distribution.voidreseedRandomGenerator(long seed) Reseeds the random generator used to generate samples.abstract double[]sample()Generates a random value vector sampled from this distribution.double[][]sample(int sampleSize) Generates a list of a random value vectors from the distribution.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.distribution.MultivariateRealDistribution
density 
- 
Field Details
 - 
Constructor Details
 - 
Method Details
- 
reseedRandomGenerator
public void reseedRandomGenerator(long seed) Reseeds the random generator used to generate samples.- Specified by:
 reseedRandomGeneratorin interfaceMultivariateRealDistribution- Parameters:
 seed- Seed with which to initialize the random number generator.
 - 
getDimension
public int getDimension()Gets the number of random variables of the distribution. It is the size of the array returned by thesamplemethod.- Specified by:
 getDimensionin interfaceMultivariateRealDistribution- Returns:
 - the number of variables.
 
 - 
sample
public abstract double[] sample()Generates a random value vector sampled from this distribution.- Specified by:
 samplein interfaceMultivariateRealDistribution- Returns:
 - a random value vector.
 
 - 
sample
public double[][] sample(int sampleSize) Generates a list of a random value vectors from the distribution.- Specified by:
 samplein interfaceMultivariateRealDistribution- Parameters:
 sampleSize- the number of random vectors to generate.- Returns:
 - an array representing the random samples.
 - See Also:
 
 
 -