SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Package Attributes | List of all members
InverseGaussianProcessMSH.NonRandomStream Class Reference

NonRandomStream:
Given a double array, this class will return those values as if it where a random stream. More...

Inheritance diagram for InverseGaussianProcessMSH.NonRandomStream:
[legend]
Collaboration diagram for InverseGaussianProcessMSH.NonRandomStream:
[legend]

Public Member Functions

 NonRandomStream (double[] array)
 
 NonRandomStream (double value)
 
double nextDouble ()
 Returns a (pseudo)random number from the uniform distribution over the interval \((0,1)\), using this stream, after advancing its state by one step. More...
 
void nextArrayOfDouble (double[] u, int start, int n)
 Generates n (pseudo)random numbers from the uniform distribution and stores them into the array u starting at index start. More...
 
void nextArrayOfInt (int i, int j, int[] u, int start, int n)
 Generates n (pseudo)random numbers from the discrete uniform distribution over the integers \(\{i,i+1,…,j\}\), using this stream and stores the result in the array u starting at index start. More...
 
int nextInt (int i, int j)
 Returns a (pseudo)random number from the discrete uniform distribution over the integers \(\{i,i+1,…,j\}\), using this stream. More...
 
void resetNextSubstream ()
 Reinitializes the stream to the beginning of its next substream: \(N_g\) is computed, and \(C_g\) and \(B_g\) are set to \(N_g\).
 
void resetStartStream ()
 Reinitializes the stream to its initial state \(I_g\): \(C_g\) and \(B_g\) are set to \(I_g\).
 
void resetStartSubstream ()
 Reinitializes the stream to the beginning of its current substream: \(C_g\) is set to \(B_g\).
 
String toString ()
 Returns a string containing the current state of this stream. More...
 

Package Attributes

double [] array
 
int position
 

Detailed Description

NonRandomStream:
Given a double array, this class will return those values as if it where a random stream.

Careful: Will not hard copy the array given as input. And not checking for end of array for the time being. And not checking j>i.

Member Function Documentation

◆ nextArrayOfDouble()

void nextArrayOfDouble ( double []  u,
int  start,
int  n 
)

Generates n (pseudo)random numbers from the uniform distribution and stores them into the array u starting at index start.

Parameters
uarray that will contain the generated uniforms
startstarting index, in the array u, to write uniforms from
nnumber of uniforms to generate

Implements RandomStream.

◆ nextArrayOfInt()

void nextArrayOfInt ( int  i,
int  j,
int []  u,
int  start,
int  n 
)

Generates n (pseudo)random numbers from the discrete uniform distribution over the integers \(\{i,i+1,…,j\}\), using this stream and stores the result in the array u starting at index start.

(Calls nextInt n times.)

Parameters
ismallest integer that can be generated
jgreatest integer that can be generated
uarray that will contain the generated values
startstarting index, in the array u, to write integers from
nnumber of values being generated

Implements RandomStream.

◆ nextDouble()

double nextDouble ( )

Returns a (pseudo)random number from the uniform distribution over the interval \((0,1)\), using this stream, after advancing its state by one step.

The generators programmed in SSJ never return the values 0 or 1.

Returns
the next generated uniform

Implements RandomStream.

◆ nextInt()

int nextInt ( int  i,
int  j 
)

Returns a (pseudo)random number from the discrete uniform distribution over the integers \(\{i,i+1,…,j\}\), using this stream.

(Calls nextDouble once.)

Parameters
ismallest integer that can be generated
jgreatest integer that can be generated
Returns
the generated integer

Implements RandomStream.

◆ toString()

String toString ( )

Returns a string containing the current state of this stream.

Returns
the state of the generator formated as a string

Implements RandomStream.


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