package umontreal.iro.lecuyer.probdistmulti;
import umontreal.iro.lecuyer.util.PrintfFormat;
import umontreal.iro.lecuyer.util.Num;
/**
* Classes implementing continuous multi-dimensional distributions should inherit
* from this class. Such distributions are characterized by a density
* function
* f (x1, x2,…, xd);
* thus the signature of a density method is supplied here.
* All array indices start at 0.
*
*/
public abstract class ContinuousDistributionMulti {
protected int dimension;
/**
* Returns
* f (x1, x2,…, xd), the probability density of
* X evaluated at the point
* x, where
* x = {x1, x2,…, xd}. The convention is that
*
* x [i - 1 ] = xi.
*
* @param x value at which the density is evaluated
*
* @return density function evaluated at x
*
*/
public abstract double density (double[] x);
/**
* Returns the dimension d of the distribution.
*
*/
public int getDimension() {
return dimension;
}
/**
* Returns the mean vector of the distribution, defined as
* μi = E[Xi].
*
*/
public abstract double[] getMean();
/**
* Returns the variance-covariance matrix of the distribution, defined as
*
* σij = E[(Xi - μi)(Xj - μj)].
*
*/
public abstract double[][] getCovariance();
/**
* Returns the correlation matrix of the distribution, defined as
*
* ρij = σij/(σ_iiσ_jj)1/2.
*
*/
public abstract double[][] getCorrelation();
}
Ads help maintain this website.