Top Description Methods
org.apache.commons.math3.distribution

public Interface MultivariateRealDistribution

Known Direct Implementers
org.apache.commons.math3.distribution.AbstractMultivariateRealDistribution
Imports
org.apache.commons.math3.exception.NotStrictlyPositiveException

Base interface for multivariate distributions on the reals. This is based largely on the RealDistribution interface, but cumulative distribution functions are not required because they are often quite difficult to compute for multivariate distributions.
Since
3.1

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

the value of the probability density function at point x.
density
(double[]
Point at which the PDF is evaluated.
x
)

Returns the probability density function (PDF) of this distribution evaluated at the specified point x.

public int

Returns:

the number of variables.
getDimension
()

Gets the number of random variables of the distribution.

public void
reseedRandomGenerator(long
Seed with which to initialize the random number generator.
seed
)

Reseeds the random generator used to generate samples.

public double[]

Returns:

a random value vector.
sample
()

Generates a random value vector sampled from this distribution.

public double[][]

Returns:

an array representing the random samples.
sample
(int
the number of random vectors to generate.
sampleSize
)

Generates a list of a random value vectors from the distribution.

Method Detail

densityback to summary
public double density(double[] x)

Returns the probability density function (PDF) of this distribution evaluated at the specified point x. In general, the PDF is the derivative of the cumulative distribution function. If the derivative does not exist at x, then an appropriate replacement should be returned, e.g. Double.POSITIVE_INFINITY, Double.NaN, or the limit inferior or limit superior of the difference quotient.

Parameters
x:double[]

Point at which the PDF is evaluated.

Returns:double

the value of the probability density function at point x.

getDimensionback to summary
public int getDimension()

Gets the number of random variables of the distribution. It is the size of the array returned by the sample method.

Returns:int

the number of variables.

reseedRandomGeneratorback to summary
public void reseedRandomGenerator(long seed)

Reseeds the random generator used to generate samples.

Parameters
seed:long

Seed with which to initialize the random number generator.

sampleback to summary
public double[] sample()

Generates a random value vector sampled from this distribution.

Returns:double[]

a random value vector.

sampleback to summary
public double[][] sample(int sampleSize) throws NotStrictlyPositiveException

Generates a list of a random value vectors from the distribution.

Parameters
sampleSize:int

the number of random vectors to generate.

Returns:double[][]

an array representing the random samples.

Exceptions
NotStrictlyPositiveException:
if sampleSize is not positive.
See Also
sample()