public final class DatanRandom
extends java.lang.Object
Constructor and Description |
---|
DatanRandom() |
Modifier and Type | Method and Description |
---|---|
static double[] |
ecuy(int n)
Combination of two MLC generators which returns an array containing n random numbers;
the method is also the basis for all other genrators in this class except mlcg.
|
static int |
getSeedMlcg()
gets current seed of MLC generator.
|
static int[] |
getSeedsEcuy()
gets current seeds of combined generator Ecuy; seeds has 2 elements.
|
static void |
line(double a,
double b,
double t0,
double dt,
double sigmay,
double[] t,
double[] y)
generates points on a line with measurement errors; equation of line is y=a*t + b;
array t will contain abscissa values beginning with t0 and incremented by dt;
array y will contain ordinate values with Gaussian error of width sigmay.
|
static double[] |
mlcg(int n)
MLC generator which returns an array containing n random numbers.
|
static DatanVector |
multivariateNormal(DatanVector aa)
returns a vector whose elements are distributed according to a multivariate normal distribution with mean aa
and covariance matrix c; the matrix c has to be set prior to using this method
by the method setCovarianceMatrixForMultivariateNormal(DatanMatrix c).
|
static double |
radio(double a,
double tau1,
double tau2)
generates a decay time; it is assumed that the source consists of a fraction a of nuclei
with mean life tau1 and a fraction (1-a) of nuclei of mean life tau2.
|
static void |
setCovarianceMatrixForMultivariateNormal(DatanMatrix c)
sets the covariance matrix of a multivariate normal distribution for
the subsequent use in the method multivariateNormal(DatanVector aa).
|
static void |
setSeedMlcg(int seed)
sets seed for MLC generator.
|
static void |
setSeedsEcuy(int[] seeds)
sets seeds for combined generator Ecuy; seeds has 2 elements.
|
static double[] |
standardNormal(int n)
returns an array containing n random numbers following the standard normal distribution;
internally the method uses the combined generator Ecuy.
|
public static double[] mlcg(int n)
public static void setSeedMlcg(int seed)
public static int getSeedMlcg()
public static double[] ecuy(int n)
public static void setSeedsEcuy(int[] seeds)
public static int[] getSeedsEcuy()
public static double[] standardNormal(int n)
public static void setCovarianceMatrixForMultivariateNormal(DatanMatrix c)
public static DatanVector multivariateNormal(DatanVector aa)
public static void line(double a, double b, double t0, double dt, double sigmay, double[] t, double[] y)
public static double radio(double a, double tau1, double tau2)