public class BiNormal
extends java.lang.Object
Constructor and Description |
---|
BiNormal() |
Modifier and Type | Method and Description |
---|---|
void |
gaussian(int max,
double mx,
double my,
double[] xval,
double[] yval,
double c11,
double c12,
double c21,
double c22)
Generates binormal gaussian random deviates
|
void |
genmn(double[] parm,
double[] x,
double[] work)
methods generates the multivariate normal deviates using the procedure:
1) generate p independent standard normal deviates - ei ~ n(0,1)
2) using cholesky decomposition find a s.t.
|
double |
ranf()
generates a uniform distribution over 0 - 1
|
double |
sdot(int n,
double[] sx,
int dx,
int incx,
double[] sy,
int dy,
int incy)
linpack.
|
void |
setgmn(double[] meanv,
double[] covm,
int p,
double[] parm)
methods sets up the parameters needed to generate the multivariate
normal deviates form the inputs given
|
double |
snorm()
ahrens, j.h.
|
void |
snorm100()
linpack.
|
void |
snorm110()
linpack.
|
void |
snorm120()
linpack.
|
void |
snorm140()
linpack.
|
void |
snorm150()
linpack.
|
void |
snorm160()
linpack.
|
void |
snorm40()
linpack.
|
void |
snorm50()
linpack.
|
void |
snorm60()
linpack.
|
void |
snorm70()
linpack.
|
void |
snorm80()
linpack.
|
void |
spofa(double[] a,
int lda,
int n)
linpack.
|
public void setgmn(double[] meanv, double[] covm, int p, double[] parm)
meanv
- mean vector of multivariate normal distributioncovm
- covariance matrix of multivariate
normal distributionp
- dimension of the normalparm
- array of parameters needed to generate
multivariate normal deviatespublic void genmn(double[] parm, double[] x, double[] work)
parm
- array of parameters needed to generate
multivariate normal deviatesx
- vector deviate generatedwork
- scratch arraypublic double ranf()
public void snorm40()
public void snorm50()
public void snorm60()
public void snorm70()
public void snorm80()
public void snorm100()
public void snorm110()
public void snorm120()
public void snorm140()
public void snorm150()
public void snorm160()
public double snorm()
public double sdot(int n, double[] sx, int dx, int incx, double[] sy, int dy, int incy)
n
- integersx
- array of doublesdx
- integerincx
- integersy
- array of doublesdy
- integerincy
- integerpublic void spofa(double[] a, int lda, int n)
a
- array of doubleslda
- integern
- integerpublic void gaussian(int max, double mx, double my, double[] xval, double[] yval, double c11, double c12, double c21, double c22)
max
- number of deviatesmx
- mean, X-COORDINATEmy
- mean, y-coordinatec11
- a11 element of the covariance matrixc12
- a12 element of the covariance matrixc21
- a21 element of the covariance matrixc22
- a22 element of the covariance matrixxval
- x-vector of the gaussian random deviatesyval
- y-vector of the gaussian random deviates