|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jmat.data.Matrix
|
+--org.jmat.data.RandomMatrix
The RandomMatrix Class provides tools for statistical simulations,it extends the Matrix Class and adds many methods.
| Field Summary |
| Fields inherited from class org.jmat.data.Matrix |
A, m, n |
| Constructor Summary | |
RandomMatrix(double[] vals,
int m)
Construct a matrix from a one-dimensional packed array |
|
RandomMatrix(int m,
int n)
Construct an m-by-n matrix of 0. |
|
RandomMatrix(Matrix M)
Construct an m-by-n matrix of 0. |
|
| Method Summary | |
static RandomMatrix |
beta(int m,
int n,
double a,
double b)
Construct an m-by-n matrix of random numbers from a Beta random variable. |
static RandomMatrix |
cauchy(int m,
int n,
double mu,
double sigma)
Construct an m-by-n matrix of random numbers from a Cauchy random variable. |
Matrix |
correlation()
Generate a correlation matrix, each column contains values of a pulling. |
Matrix |
covariance()
Generate a covariance matrix, each column contains values of a pulling. |
static RandomMatrix |
dirac(int m,
int n,
Matrix val_prob)
Construct an m-by-n matrix of random numbers from a discrete random variable. |
static RandomMatrix |
exponential(int m,
int n,
double lambda)
Construct an m-by-n matrix of random numbers from an exponantial random variable. |
boolean |
getIsSample()
Specify if the RandomMatrix is a sample of an overall population, or if it's an overall population. |
static RandomMatrix |
logNormal(int m,
int n,
double mu,
double sigma)
Construct an m-by-n matrix of random numbers from a LogNormal random variable. |
Matrix |
mean()
Generate a row matrix, each column contents the mean value of the columns. |
static RandomMatrix |
normal(int m,
int n,
double mu,
double sigma)
Construct an m-by-n matrix of random numbers from a Gaussian (Normal) random variable. |
static RandomMatrix |
rejection(int m,
int n,
DoubleFunction fun,
double min,
double max)
Construct an m-by-n matrix of random numbers from a random variable definied by its density function, using the rejection technic. ! |
static RandomMatrix |
sampleWithoutReplacement(int m,
int n,
Matrix B)
Construct a sample without replacement of a matrix. |
static RandomMatrix |
sampleWithReplacement(int m,
int n,
Matrix B)
Construct a sample with replacement of a matrix. |
void |
setIsSample(boolean is)
Specify if the RandomMatrix is a sample of an overall population, or if it's an overall population. |
void |
toHist2DPanel(Plot2DPanel panel,
java.lang.String name,
int num)
Print the Matrix in a JPanel. |
Plot2DPanel |
toHist2DPanel(java.lang.String name,
int num)
Print the Matrix in an histogram in a JPanel. |
void |
toHist3DPanel(Plot3DPanel panel,
java.lang.String name,
int num)
Print the Matrix in a JPanel. |
Plot3DPanel |
toHist3DPanel(java.lang.String name,
int num)
Print the Matrix in a JPanel. |
static RandomMatrix |
triangular(int m,
int n,
double min,
double max)
Construct an m-by-n matrix of random numbers from a symetric triangular random variable. |
static RandomMatrix |
triangular(int m,
int n,
double min,
double med,
double max)
Construct an m-by-n matrix of random numbers from a non-symetric triangular random variable. |
static RandomMatrix |
uniform(int m,
int n,
double min,
double max)
Construct an m-by-n matrix of random numbers from a uniform random variable. |
Matrix |
variance()
Generate a variance matrix, each column contains values of a pulling. |
static RandomMatrix |
weibull(int m,
int n,
double lambda,
double c)
Construct an m-by-n matrix of random numbers from a Weibull random variable. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RandomMatrix(int m,
int n)
m - Number of rows.n - Number of columns.public RandomMatrix(Matrix M)
M - Matrix to construct.
public RandomMatrix(double[] vals,
int m)
vals - One-dimensional array of doubles, packed by columns (ala Fortran).m - Number of rows.
java.lang.IllegalArgumentException - Array length must be a multiple of m.| Method Detail |
public static RandomMatrix uniform(int m,
int n,
double min,
double max)
m - Number of rows.n - Number of columns.min - Min of the random variable.max - Max of the random variable.
public static RandomMatrix dirac(int m,
int n,
Matrix val_prob)
m - Number of rows.n - Number of columns.val_prob - Matrix of the discrete value and their probabilities.
public static RandomMatrix normal(int m,
int n,
double mu,
double sigma)
m - Number of rows.n - Number of columns.mu - Mean of the random variable.sigma - Standard deviation of the random variable.
public static RandomMatrix logNormal(int m,
int n,
double mu,
double sigma)
m - Number of rows.n - Number of columns.mu - Mean of the Normal random variable.sigma - Standard deviation of the Normal random variable.
public static RandomMatrix exponential(int m,
int n,
double lambda)
m - Number of rows.n - Number of columns.lambda - Parmaeter of the exponential random variable.
public static RandomMatrix triangular(int m,
int n,
double min,
double max)
m - Number of rows.n - Number of columns.min - Min of the random variable.max - Max of the random variable.
public static RandomMatrix triangular(int m,
int n,
double min,
double med,
double max)
m - Number of rows.n - Number of columns.min - Min of the random variable.med - Value of the random variable with max density.max - Max of the random variable.
public static RandomMatrix beta(int m,
int n,
double a,
double b)
m - Number of rows.n - Number of columns.a - First parameter of the Beta random variable < 1.b - Second parameter of the Beta random variable < 1.
public static RandomMatrix cauchy(int m,
int n,
double mu,
double sigma)
m - Number of rows.n - Number of columns.mu - Median of the Weibull random variablesigma - Second parameter of the Cauchy random variable.
public static RandomMatrix weibull(int m,
int n,
double lambda,
double c)
m - Number of rows.n - Number of columns.lambda - First parameter of the Weibull random variable.c - Second parameter of the Weibull random variable.
public static RandomMatrix rejection(int m,
int n,
DoubleFunction fun,
double min,
double max)
m - Number of rows.n - Number of columns.fun - Density function of the random variable.min - Min of the random variable.max - Max of the random variable.
public static RandomMatrix sampleWithReplacement(int m,
int n,
Matrix B)
m - Number of rows.n - Number of columns.B - Matrix to sample.
public static RandomMatrix sampleWithoutReplacement(int m,
int n,
Matrix B)
m - Number of rows.n - Number of columns.B - Matrix to sample.
public void setIsSample(boolean is)
is - Is sample?.public boolean getIsSample()
public Matrix mean()
mean in class Matrixpublic Matrix covariance()
covariance in class Matrixpublic Matrix correlation()
correlation in class Matrixpublic Matrix variance()
variance in class Matrix
public Plot2DPanel toHist2DPanel(java.lang.String name,
int num)
name - name of the plot.num - number of slices.
public Plot3DPanel toHist3DPanel(java.lang.String name,
int num)
num - number of slices.name - name of the plot.
public void toHist2DPanel(Plot2DPanel panel,
java.lang.String name,
int num)
panel - Panel to modify.name - name of the plot.num - number of slices.
public void toHist3DPanel(Plot3DPanel panel,
java.lang.String name,
int num)
panel - Panel to modify.name - name of the plot.num - number of slices.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||