distribution
Interface MultivariateDistribution

All Known Subinterfaces:
MultivariateMixture
All Known Implementing Classes:
BasicMultivariateDistribution, BasicMultivariateMixture, LatinHypercube, MultivariateNormal, Uniform

public interface MultivariateDistribution

Basic functionality for multivariate continuous random variables.

Author:
dgorur

Method Summary
 double densityAt(double[] x)
          Computes the density at the given point.
 void densityAt(double[][] x, double[] p)
          Computes the density at the points that make up the rows of the input array, and places the result in the supplied array.
 double densityAt(cern.colt.matrix.DoubleMatrix1D x)
          Computes the density at the given point.
 cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x)
          Computes the density at the points comprising the rows of the input matrix, and returns a newly-created vector holding the result.
 cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x, cern.colt.matrix.DoubleMatrix1D p)
          Computes the density at the points comprising the rows of the input matrix, and places the result in the supplied vector.
 int getInputDimension()
          Returns the number of dimensions of this distribution
 cern.colt.matrix.DoubleMatrix1D makeNextSample()
          Creates and returns a vector holding the next random sample.
 cern.colt.matrix.DoubleMatrix2D makeNextSample(int numSamples)
          Creates and returns a matrix holding the next numSamples random samples.
 void nextSample(double[] arr)
          Generates the next random sample of this distribution and places the result in the supplied array.
 void nextSample(double[][] arr)
          Generates the next m random samples of this distribution and places the result in the supplied array.
 cern.colt.matrix.DoubleMatrix1D nextSample(cern.colt.matrix.DoubleMatrix1D vec)
          Generates the next random sample of this distribution and places the result in the supplied vector.
 cern.colt.matrix.DoubleMatrix2D nextSample(cern.colt.matrix.DoubleMatrix2D mat)
          Generates the next m random samples of this distribution and places the result in the supplied matrix.
 void setInputDimension(int inputDimension)
          Sets the number of dimensions of this distribution
 void setSeed(int seed)
          Sets the seed for the random number generator of this distribution instance.
 

Method Detail

densityAt

double densityAt(double[] x)
Computes the density at the given point.

Parameters:
x - the given point.
Returns:
the density at the given point.

densityAt

void densityAt(double[][] x,
               double[] p)
Computes the density at the points that make up the rows of the input array, and places the result in the supplied array.

Parameters:
x - array whose rows are the points where density is desired.
p - array to hold the result, cannot be null.

densityAt

double densityAt(cern.colt.matrix.DoubleMatrix1D x)
Computes the density at the given point.

Parameters:
x - the given point
Returns:
the density at the given point.

densityAt

cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x)
Computes the density at the points comprising the rows of the input matrix, and returns a newly-created vector holding the result.

Parameters:
x - matrix whose rows comprise the points where density is desired.

densityAt

cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x,
                                          cern.colt.matrix.DoubleMatrix1D p)
Computes the density at the points comprising the rows of the input matrix, and places the result in the supplied vector.

Parameters:
x - matrix whose rows are the points where density is desired.
p - vector to hold the result, cannot be null.
Returns:
pointer to the result vector, for convenience.

getInputDimension

int getInputDimension()
Returns the number of dimensions of this distribution

Returns:
the number of dimensions.

makeNextSample

cern.colt.matrix.DoubleMatrix1D makeNextSample()
Creates and returns a vector holding the next random sample.

Returns:
a new vector holding the next random sample.

makeNextSample

cern.colt.matrix.DoubleMatrix2D makeNextSample(int numSamples)
Creates and returns a matrix holding the next numSamples random samples.

Parameters:
numSamples - the number of samples desired.
Returns:
a new matrix holding the next numSamples samples.

nextSample

void nextSample(double[] arr)
Generates the next random sample of this distribution and places the result in the supplied array.

Parameters:
arr - array to store the result, cannot be null.

nextSample

void nextSample(double[][] arr)
Generates the next m random samples of this distribution and places the result in the supplied array. the number m is inferred from the number of rows in the supplied array.

Parameters:
arr - array to hold the result, cannot be null.

nextSample

cern.colt.matrix.DoubleMatrix1D nextSample(cern.colt.matrix.DoubleMatrix1D vec)
Generates the next random sample of this distribution and places the result in the supplied vector. Returns a pointer to the same vector for convenience.

Parameters:
vec - vector to hold the result. Cannot be null. Use makeNextSample() if the sample needs to be created from scratch.
Returns:
pointer to the same vector, for convenience.

nextSample

cern.colt.matrix.DoubleMatrix2D nextSample(cern.colt.matrix.DoubleMatrix2D mat)
Generates the next m random samples of this distribution and places the result in the supplied matrix. Returns a pointer to the same matrix for convenience.

Parameters:
mat - matrix to hold the result. Cannot be null
Returns:
a pointer to the same matrix, for convenience. Use makeNextSample(int) to creates samples from scratch.

setInputDimension

void setInputDimension(int inputDimension)
Sets the number of dimensions of this distribution

Parameters:
inputDimension - the given number of dimensions.

setSeed

void setSeed(int seed)
Sets the seed for the random number generator of this distribution instance.

Parameters:
seed - the given seed.