Interface MultivariateRealDistribution
-
- All Known Implementing Classes:
AbstractMultivariateRealDistribution
,MixtureMultivariateNormalDistribution
,MixtureMultivariateRealDistribution
,MultivariateNormalDistribution
public interface MultivariateRealDistribution
Base interface for multivariate distributions on the reals. This is based largely on theContinuousDistribution
interface, but cumulative distribution functions are not required because they are often quite difficult to compute for multivariate distributions.- Since:
- 3.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MultivariateRealDistribution.Sampler
Sampling functionality.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MultivariateRealDistribution.Sampler
createSampler(org.apache.commons.rng.UniformRandomProvider rng)
Creates a sampler.double
density(double[] x)
Returns the probability density function (PDF) of this distribution evaluated at the specified pointx
.int
getDimension()
Gets the number of random variables of the distribution.
-
-
-
Method Detail
-
density
double density(double[] x)
Returns the probability density function (PDF) of this distribution evaluated at the specified pointx
. In general, the PDF is the derivative of the cumulative distribution function. If the derivative does not exist atx
, 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
- Point at which the PDF is evaluated.- Returns:
- the value of the probability density function at point
x
.
-
getDimension
int getDimension()
Gets the number of random variables of the distribution. It is the size of the array returned by thesample
method.- Returns:
- the number of variables.
-
createSampler
MultivariateRealDistribution.Sampler createSampler(org.apache.commons.rng.UniformRandomProvider rng)
Creates a sampler.- Parameters:
rng
- Generator of uniformly distributed numbers.- Returns:
- a sampler that produces random numbers according this distribution.
- Since:
- 4.0
-
-