SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.randvar.ChiRatioOfUniformsGen Class Reference

This class implements Chi random variate generators using the ratio of uniforms method with shift. More...

Inheritance diagram for umontreal.ssj.randvar.ChiRatioOfUniformsGen:
umontreal.ssj.randvar.ChiGen umontreal.ssj.randvar.RandomVariateGen

Public Member Functions

 ChiRatioOfUniformsGen (RandomStream s, int nu)
 Creates a chi random variate generator with \(\nu=\) nu degrees of freedom, using stream s.
 ChiRatioOfUniformsGen (RandomStream s, ChiDist dist)
 Create a new generator for the distribution dist, using stream s.
double nextDouble ()
 Generates a random number from the continuous distribution contained in this object.
Public Member Functions inherited from umontreal.ssj.randvar.ChiGen
 ChiGen (RandomStream s, int nu)
 Creates a chi random variate generator with \(\nu=\) nu degrees of freedom, using stream s.
 ChiGen (RandomStream s, ChiDist dist)
 Create a new generator for the distribution dist, using stream s.
int getNu ()
 Returns the value of \(\nu\) for this object.
Public Member Functions inherited from umontreal.ssj.randvar.RandomVariateGen
 RandomVariateGen (RandomStream s, Distribution dist)
 Creates a new random variate generator from the distribution dist, using stream s.
void nextArrayOfDouble (double[] v, int start, int n)
 Generates n random numbers from the continuous distribution contained in this object.
double[] nextArrayOfDouble (int n)
 Generates n random numbers from the continuous distribution contained in this object, and returns them in a new array of size n.
RandomStream getStream ()
 Returns the umontreal.ssj.rng.RandomStream used by this generator.
void setStream (RandomStream stream)
 Sets the umontreal.ssj.rng.RandomStream used by this generator to stream.
Distribution getDistribution ()
 Returns the umontreal.ssj.probdist.Distribution used by this generator.
String toString ()
 Returns a String containing information about the current generator.

Static Public Member Functions

static double nextDouble (RandomStream s, int nu)
 Generates a random variate from the chi distribution with \(\nu= \) nu degrees of freedom, using stream s.

Detailed Description

This class implements Chi random variate generators using the ratio of uniforms method with shift.

Definition at line 39 of file ChiRatioOfUniformsGen.java.

Constructor & Destructor Documentation

◆ ChiRatioOfUniformsGen() [1/2]

umontreal.ssj.randvar.ChiRatioOfUniformsGen.ChiRatioOfUniformsGen ( RandomStream s,
int nu )

Creates a chi random variate generator with \(\nu=\) nu degrees of freedom, using stream s.

Definition at line 45 of file ChiRatioOfUniformsGen.java.

◆ ChiRatioOfUniformsGen() [2/2]

umontreal.ssj.randvar.ChiRatioOfUniformsGen.ChiRatioOfUniformsGen ( RandomStream s,
ChiDist dist )

Create a new generator for the distribution dist, using stream s.

Definition at line 53 of file ChiRatioOfUniformsGen.java.

Member Function Documentation

◆ nextDouble() [1/2]

double umontreal.ssj.randvar.ChiRatioOfUniformsGen.nextDouble ( )

Generates a random number from the continuous distribution contained in this object.

By default, this method uses inversion by calling the umontreal.ssj.probdist.ContinuousDistribution.inverseF method of the distribution object. Alternative generating methods are provided in subclasses.

Returns
the generated value

Reimplemented from umontreal.ssj.randvar.RandomVariateGen.

Definition at line 59 of file ChiRatioOfUniformsGen.java.

◆ nextDouble() [2/2]

double umontreal.ssj.randvar.ChiRatioOfUniformsGen.nextDouble ( RandomStream s,
int nu )
static

Generates a random variate from the chi distribution with \(\nu= \) nu degrees of freedom, using stream s.

Reimplemented from umontreal.ssj.randvar.ChiGen.

Definition at line 63 of file ChiRatioOfUniformsGen.java.


The documentation for this class was generated from the following file: