Class BiNormal

java.lang.Object
  extended by BiNormal

public class BiNormal
extends java.lang.Object


Constructor Summary
BiNormal()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BiNormal

public BiNormal()
Method Detail

setgmn

public 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

Parameters:
meanv - mean vector of multivariate normal distribution
covm - covariance matrix of multivariate normal distribution
p - dimension of the normal
parm - array of parameters needed to generate multivariate normal deviates

genmn

public 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. trans(a)*a = covm 3) trans(a)e + meanv ~ n(meanv,covm)

Parameters:
parm - array of parameters needed to generate multivariate normal deviates
x - vector deviate generated
work - scratch array

ranf

public double ranf()
generates a uniform distribution over 0 - 1

Returns:
random floating point number from a uniform distribution over 0 - 1 using the current generator

snorm40

public void snorm40()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm50

public void snorm50()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm60

public void snorm60()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm70

public void snorm70()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm80

public void snorm80()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm100

public void snorm100()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm110

public void snorm110()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm120

public void snorm120()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm140

public void snorm140()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm150

public void snorm150()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm160

public void snorm160()
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab


snorm

public double snorm()
ahrens, j.h. and dieter, u. extensions of forsythe's method for random sampling from the normal distribution. math. comput., 27,124 (oct. 1973), 927 - 937.

Returns:
standard normal distribution

sdot

public double sdot(int n,
                   double[] sx,
                   int dx,
                   int incx,
                   double[] sy,
                   int dy,
                   int incy)
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab

Parameters:
n - integer
sx - array of doubles
dx - integer
incx - integer
sy - array of doubles
dy - integer
incy - integer
Returns:
double value of sdot

spofa

public void spofa(double[] a,
                  int lda,
                  int n)
linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab

Parameters:
a - array of doubles
lda - integer
n - integer

gaussian

public 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

Parameters:
max - number of deviates
mx - mean, X-COORDINATE
my - mean, y-coordinate
c11 - a11 element of the covariance matrix
c12 - a12 element of the covariance matrix
c21 - a21 element of the covariance matrix
c22 - a22 element of the covariance matrix
xval - x-vector of the gaussian random deviates
yval - y-vector of the gaussian random deviates