MultivariateRealDistribution
MixtureMultivariateRealDistribution
, MultivariateNormalDistribution
public abstract class AbstractMultivariateRealDistribution extends Object implements MultivariateRealDistribution
Modifier and Type | Field | Description |
---|---|---|
protected RandomGenerator |
random |
RNG instance used to generate samples from the distribution.
|
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractMultivariateRealDistribution(RandomGenerator rng,
int n) |
Modifier and Type | Method | Description |
---|---|---|
int |
getDimension() |
Gets the number of random variables of the distribution.
|
void |
reseedRandomGenerator(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.
|
density
protected final RandomGenerator random
protected AbstractMultivariateRealDistribution(RandomGenerator rng, int n)
rng
- Random number generator.n
- Number of dimensions.public void reseedRandomGenerator(long seed)
reseedRandomGenerator
in interface MultivariateRealDistribution
seed
- Seed with which to initialize the random number generator.public int getDimension()
sample
method.getDimension
in interface MultivariateRealDistribution
public abstract double[] sample()
sample
in interface MultivariateRealDistribution
public double[][] sample(int sampleSize)
sample
in interface MultivariateRealDistribution
sampleSize
- the number of random vectors to generate.MultivariateRealDistribution.sample()
Copyright © 2016–2018 Hipparchus.org. All rights reserved.