Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.randvarmulti
Class MultiNormalGen

    java.lang.Object
      umontreal.iro.lecuyer.randvarmulti.RandomMultivariateGen
          umontreal.iro.lecuyer.randvarmulti.MultiNormalGen

Deprecated.

    @Deprecated
    public class MultiNormalGen

extends RandomMultivariateGen

Constructor Summary
`MultiNormalGen(NormalGen gen1, double[] mu, double[][] sigma)` Deprecated. Equivalent to `MultiNormalGen` `(gen1, mu, new DenseDoubleMatrix2D (sigma))`.
`MultiNormalGen(NormalGen gen1, double[] mu, DoubleMatrix2D sigma)` Deprecated. Constructs a multinormal generator with mean vector `mu` and covariance matrix `sigma`, using the one-dimensional normal generator `gen1`.
`MultiNormalGen(NormalGen gen1, int d)` Deprecated. Constructs a standard d-dimensional multinormal generator, using the one-dimensional generator `gen1`.

Method Summary
`DoubleMatrix2D` | `getCholeskyDecompSigma()` Deprecated. Returns the Cholesky decomposition of the covariance matrix used for generating the vectors.
`double[]` | `getMu()` Deprecated. Returns the mean vector used by this generator.
`double` | `getMu(int i)` Deprecated. Returns the i-th component of the mean vector for this generator.
`DoubleMatrix2D` | `getSigma()` Deprecated. Returns the covariance matrix Σ used by this generator.
`void` | `nextPoint(double[] p)` Deprecated. Generates a point from the multinormal distribution.
`static void` | `nextPoint(NormalGen gen1, double[] mu, double[][] sigma, double[] p)` Deprecated. Equivalent to `nextPoint` `(gen1, mu, new DenseDoubleMatrix2D (sigma), p)`.
`static void` | `nextPoint(NormalGen gen1, double[] mu, DoubleMatrix2D sigma, double[] p)` Deprecated. Generates a point from the multinormal distribution with mean vector `mu`, and covariance matrix `sigma`, using the one-dimensional normal generator `gen1`.
`void` | `setMu(double[] mu)` Deprecated. Sets the mean vector to `mu`.
`void` | `setMu(int i, double mui)` Deprecated. Sets the i-th component of the mean vector to `mui`.
`void` | `setSigma(DoubleMatrix2D sigma)` Deprecated. Sets the covariance matrix of this multinormal generator to `sigma`.

Methods inherited from class umontreal.iro.lecuyer.randvarmulti.RandomMultivariateGen
`getDimension, getStream, nextArrayOfPoints, setStream`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MultiNormalGen

    public MultiNormalGen(NormalGen gen1,
                          int d)

  Deprecated.
  Constructs a standard d-dimensional multinormal generator, using the one-dimensional generator `gen1`.

  Parameters:
    `gen1` - the one-dimensional generator
    `d` - the dimension of the generated vectors
  Throws:
    `IllegalArgumentException` - if the one-dimensional normal generator uses a normal distribution with μ not equal to 0, or σ not equal to 1.
    `IllegalArgumentException` - if `d` is negative.
    `NullPointerException` - if `gen1` is `null`.

### MultiNormalGen

    public MultiNormalGen(NormalGen gen1,
                          double[] mu,
                          DoubleMatrix2D sigma)

  Deprecated.
  Constructs a multinormal generator with mean vector `mu` and covariance matrix `sigma`, using the one-dimensional normal generator `gen1`. The mean vector must have the same length as the dimensions of the covariance matrix, which must be symmetric and positive-definite. If any of the above conditions is violated, an exception is thrown.

  Parameters:
    `gen1` - the one-dimensional generator
    `mu` - the mean vector.
    `sigma` - the covariance matrix.
  Throws:
    `NullPointerException` - if any argument is `null`.
    `IllegalArgumentException` - if the length of the mean vector is incompatible with the dimensions of the covariance matrix.

### MultiNormalGen

    public MultiNormalGen(NormalGen gen1,
                          double[] mu,
                          double[][] sigma)

  Deprecated.
  Equivalent to `MultiNormalGen` `(gen1, mu, new DenseDoubleMatrix2D (sigma))`.

Method Detail

### getMu

    public double[] getMu()

  Deprecated.
  Returns the mean vector used by this generator.

  Returns:
    the current mean vector.

### getMu

    public double getMu(int i)

  Deprecated.
  Returns the i-th component of the mean vector for this generator.

  Parameters:
    `i` - the index of the required component.
  Returns:
    the value of μi.
  Throws:
    `ArrayIndexOutOfBoundsException` - if `i` is negative or greater than or equal to `getDimension`.

### setMu

    public void setMu(double[] mu)

  Deprecated.
  Sets the mean vector to `mu`.

  Parameters:
    `mu` - the new mean vector.
  Throws:
    `NullPointerException` - if `mu` is `null`.
    `IllegalArgumentException` - if the length of `mu` does not correspond to `getDimension`.

### setMu

    public void setMu(int i,
                      double mui)

  Deprecated.
  Sets the i-th component of the mean vector to `mui`.

  Parameters:
    `i` - the index of the modified component.
    `mui` - the new value of μi.
  Throws:
    `ArrayIndexOutOfBoundsException` - if `i` is negative or greater than or equal to `getDimension`.

### getSigma

    public DoubleMatrix2D getSigma()

  Deprecated.
  Returns the covariance matrix Σ used by this generator.

  Returns:
    the used covariance matrix.

### getCholeskyDecompSigma

    public DoubleMatrix2D getCholeskyDecompSigma()

  Deprecated.
  Returns the Cholesky decomposition of the covariance matrix used for generating the vectors. The returned matrix A is defined such that Σ = ATA.

  Returns:
    the Cholesky decomposition of the covariance matrix.

### setSigma

    public void setSigma(DoubleMatrix2D sigma)

  Deprecated.
  Sets the covariance matrix of this multinormal generator to `sigma`.

  Parameters:
    `sigma` - the new covariance matrix.
  Throws:
    `IllegalArgumentException` - if `sigma` has incorrect dimensions.

### nextPoint

    public static void nextPoint(NormalGen gen1,
                                 double[] mu,
                                 DoubleMatrix2D sigma,
                                 double[] p)

  Deprecated.
  Generates a point from the multinormal distribution with mean vector `mu`, and covariance matrix `sigma`, using the one-dimensional normal generator `gen1`. The resulting vector is put into `p`. Note that this static method may be slow for large dimension, because it needs to compute the Cholesky decomposition at every call. It is therefore recommended to use a `MultiNormalGen` object instead.

  Parameters:
    `p` - the array to be filled with the generated point.
  Throws:
    `IllegalArgumentException` - if the one-dimensional normal generator uses a normal distribution with μ not equal to 0, or σ not equal to 1.
    `IllegalArgumentException` - if the length of the mean vector is different from the dimensions of the covariance matrix, or if the covariance matrix is not symmetric and positive-definite.
    `NullPointerException` - if any argument is `null`.

### nextPoint

    public static void nextPoint(NormalGen gen1,
                                 double[] mu,
                                 double[][] sigma,
                                 double[] p)

  Deprecated.
  Equivalent to `nextPoint` `(gen1, mu, new DenseDoubleMatrix2D (sigma), p)`.

### nextPoint

    public void nextPoint(double[] p)

  Deprecated.
  Generates a point from the multinormal distribution.

  Specified by:
    `nextPoint` in class `RandomMultivariateGen`
  Parameters:
    `p` - the array to be filled with the generated point

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.