|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdistribution.BasicMultivariateDistribution
public abstract class BasicMultivariateDistribution
Abstract class that implements most of the convenience methods in
MultivariateDistribution. Subclasses only need implement
MultivariateDistribution.densityAt(double[]) and MultivariateDistribution.nextSample(double[]) to complete
the implementation. They may, however, want to override one or more of the
methods here for performance reasons.
| Field Summary | |
|---|---|
protected cern.jet.random.engine.RandomEngine |
randomEngine
|
| Constructor Summary | |
|---|---|
BasicMultivariateDistribution()
|
|
| Method Summary | |
|---|---|
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 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface distribution.MultivariateDistribution |
|---|
densityAt, nextSample, setSeed |
| Field Detail |
|---|
protected cern.jet.random.engine.RandomEngine randomEngine
| Constructor Detail |
|---|
public BasicMultivariateDistribution()
| Method Detail |
|---|
public void densityAt(double[][] x,
double[] p)
MultivariateDistribution
densityAt in interface MultivariateDistributionx - array whose rows are the points where density is desired.p - array to hold the result, cannot be null.public double densityAt(cern.colt.matrix.DoubleMatrix1D x)
MultivariateDistribution
densityAt in interface MultivariateDistributionx - the given point
public cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x)
MultivariateDistribution
densityAt in interface MultivariateDistributionx - matrix whose rows comprise the points where density is desired.
public cern.colt.matrix.DoubleMatrix1D densityAt(cern.colt.matrix.DoubleMatrix2D x,
cern.colt.matrix.DoubleMatrix1D p)
MultivariateDistribution
densityAt in interface MultivariateDistributionx - matrix whose rows are the points where density is desired.p - vector to hold the result, cannot be null.
public int getInputDimension()
MultivariateDistribution
getInputDimension in interface MultivariateDistributionpublic cern.colt.matrix.DoubleMatrix1D makeNextSample()
MultivariateDistribution
makeNextSample in interface MultivariateDistributionpublic cern.colt.matrix.DoubleMatrix2D makeNextSample(int numSamples)
MultivariateDistributionnumSamples random
samples.
makeNextSample in interface MultivariateDistributionnumSamples - the number of samples desired.
numSamples samples.public void nextSample(double[][] arr)
MultivariateDistributionm 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.
nextSample in interface MultivariateDistributionarr - array to hold the result, cannot be null.public cern.colt.matrix.DoubleMatrix1D nextSample(cern.colt.matrix.DoubleMatrix1D vec)
MultivariateDistribution
nextSample in interface MultivariateDistributionvec - vector to hold the result. Cannot be null. Use
MultivariateDistribution.makeNextSample() if the sample
needs to be created from scratch.
public cern.colt.matrix.DoubleMatrix2D nextSample(cern.colt.matrix.DoubleMatrix2D mat)
MultivariateDistributionm random samples of this distribution and places
the result in the supplied matrix. Returns a pointer to the same matrix for
convenience.
nextSample in interface MultivariateDistributionmat - matrix to hold the result. Cannot be null
MultivariateDistribution.makeNextSample(int) to creates
samples from scratch.public void setInputDimension(int inputDimension)
MultivariateDistribution
setInputDimension in interface MultivariateDistributioninputDimension - the given number of dimensions.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||