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.randvar
Class StudentPolarGen

    java.lang.Object
      umontreal.iro.lecuyer.randvar.RandomVariateGen
          umontreal.iro.lecuyer.randvar.StudentGen
              umontreal.iro.lecuyer.randvar.StudentPolarGen

    public class StudentPolarGen

extends StudentGen

This class implements Student random variate generators using the polar method of. The code is adapted from UNURAN.

The non-static `nextDouble` method generates two variates at a time and the second one is saved for the next call. A pair of variates is generated every second call. In the static case, two variates are generated per call but only the first one is returned and the second is discarded.

Constructor Summary
`StudentPolarGen(RandomStream s, int n)` Creates a Student random variate generator with n degrees of freedom, using stream `s`.
`StudentPolarGen(RandomStream s, StudentDist dist)` Creates a new generator for the Student distribution `dist` and stream `s`.

Method Summary
`double` | `nextDouble()` Generates a random number from the continuous distribution contained in this object.
`static double` | `nextDouble(RandomStream s, int n)`

Methods inherited from class umontreal.iro.lecuyer.randvar.StudentGen
`getN`

Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
`getDistribution, getStream, nextArrayOfDouble, setStream`

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

Constructor Detail

### StudentPolarGen

    public StudentPolarGen(RandomStream s,
                           int n)

  Creates a Student random variate generator with n degrees of freedom, using stream `s`.

### StudentPolarGen

    public StudentPolarGen(RandomStream s,
                           StudentDist dist)

  Creates a new generator for the Student distribution `dist` and stream `s`.

Method Detail

### nextDouble

    public double nextDouble()

  Description copied from class: `RandomVariateGen`
  Generates a random number from the continuous distribution contained in this object. By default, this method uses inversion by calling the `inverseF` method of the distribution object. Alternative generating methods are provided in subclasses.

  Overrides:
    `nextDouble` in class `RandomVariateGen`
  Returns:
    the generated value

### nextDouble

    public static double nextDouble(RandomStream s,
                                    int n)

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.