Samples the path by bridge sampling: first finding the process value at the final time and then the middle time, etc. More...
Public Member Functions | |
InverseGaussianProcessBridge (double s0, double delta, double gamma, RandomStream stream, RandomStream otherStream) | |
Constructs a new InverseGaussianProcessBridge . More... | |
double [] | generatePath () |
Generates the path. More... | |
double [] | generatePath (double[] unifNorm, double[] unifOther) |
Instead of using the internal streams to generate the path, it uses two arrays of uniforms U[0,1). More... | |
double | nextObservation () |
Returns the next observation in the bridge order, not the sequential order. | |
void | resetStartProcess () |
RandomStream | getStream () |
Only returns a stream if both inner streams are the same. | |
void | setStream (RandomStream stream, RandomStream otherStream) |
Sets the streams. | |
void | setStream (RandomStream stream) |
Sets both inner streams to the same stream . | |
![]() | |
InverseGaussianProcessMSH (double s0, double delta, double gamma, RandomStream stream, RandomStream otherStream) | |
Constructs a new InverseGaussianProcessMSH . More... | |
double [] | generatePath () |
Generates the path. More... | |
double [] | generatePath (double[] unifNorm, double[] unifOther) |
Instead of using the internal streams to generate the path, uses two arrays of uniforms U[0,1). More... | |
double [] | generatePath (double[] uniforms01) |
Not implemented, requires two umontreal.ssj.rng.RandomStream ’s. | |
double | nextObservation () |
RandomStream | getStream () |
Only returns a stream if both inner umontreal.ssj.rng.RandomStream ’s are the same. | |
void | setStream (RandomStream stream, RandomStream otherStream) |
Sets the streams. | |
void | setStream (RandomStream stream) |
Sets both inner streams to stream . | |
void | setOtherStream (RandomStream otherStream) |
Sets the otherStream , which is the stream used to choose between the two roots in the MSH method. | |
RandomStream | getOtherStream () |
Returns the otherStream , which is the stream used to choose between the two quadratic roots from the MSH method. | |
void | setNormalGen (NormalGen normalGen) |
Sets the normal generator. More... | |
NormalGen | getNormalGen () |
Returns the normal generator. | |
![]() | |
InverseGaussianProcess (double s0, double delta, double gamma, RandomStream stream) | |
Constructs a new InverseGaussianProcess . More... | |
double [] | generatePath () |
double [] | generatePath (double[] uniforms01) |
Instead of using the internal stream to generate the path, uses an array of uniforms U[0,1). More... | |
double [] | generatePath (double[] uniforms01, double[] uniforms01b) |
This method does not work for this class, but will be useful for the subclasses that require two streams. | |
double | nextObservation () |
void | setParams (double delta, double gamma) |
Sets the parameters. | |
double | getDelta () |
Returns \delta. | |
double | getGamma () |
Returns \gamma. | |
double | getAnalyticAverage (double time) |
Returns the analytic average which is \delta t/ \gamma, with t= time . | |
double | getAnalyticVariance (double time) |
Returns the analytic variance which is (\delta t)^2, with t= time . | |
RandomStream | getStream () |
void | setStream (RandomStream stream) |
int | getNumberOfRandomStreams () |
Returns the number of random streams of this process. More... | |
![]() | |
void | setObservationTimes (double[] T, int d) |
Sets the observation times of the process to a copy of T , with. More... | |
void | setObservationTimes (double delta, int d) |
Sets equidistant observation times at t_j = j\delta, for. More... | |
double [] | getObservationTimes () |
Returns a reference to the array that contains the observation times. More... | |
int | getNumObservationTimes () |
Returns the number d of observation times, excluding the time t_0. | |
abstract double [] | generatePath () |
Generates, returns, and saves the sample path \{X(t_0), X(t_1), \dots, X(t_d)\}. More... | |
double [] | generatePath (RandomStream stream) |
Same as generatePath() , but first resets the stream to stream . | |
double [] | getPath () |
Returns a reference to the last generated sample path \{X(t_0), ... , X(t_d)\}. More... | |
void | getSubpath (double[] subpath, int[] pathIndices) |
Returns in subpath the values of the process at a subset of the observation times, specified as the times t_j whose indices. More... | |
double | getObservation (int j) |
Returns X(t_j) from the current sample path. More... | |
void | resetStartProcess () |
Resets the observation counter to its initial value j=0, so that the current observation X(t_j) becomes X(t_0). More... | |
boolean | hasNextObservation () |
Returns true if j<d, where j is the number of observations of the current sample path generated since the last call to resetStartProcess. More... | |
double | nextObservation () |
Generates and returns the next observation X(t_j) of the stochastic process. More... | |
int | getCurrentObservationIndex () |
Returns the value of the index j corresponding to the time. More... | |
double | getCurrentObservation () |
Returns the value of the last generated observation X(t_j). | |
double | getX0 () |
Returns the initial value X(t_0) for this process. | |
void | setX0 (double s0) |
Sets the initial value X(t_0) for this process to s0 , and reinitializes. | |
abstract void | setStream (RandomStream stream) |
Resets the random stream of the underlying generator to stream . | |
abstract RandomStream | getStream () |
Returns the random stream of the underlying generator. | |
int [] | getArrayMappingCounterToIndex () |
Returns a reference to an array that maps an integer k to i_k, the index of the observation S(t_{i_k}) corresponding to the k-th observation to be generated for a sample path of this process. More... | |
Protected Member Functions | |
void | init () |
![]() | |
void | init () |
![]() | |
void | init () |
Protected Attributes | |
double [] | imu2 |
double [] | imuLambdaZ |
double [] | imuOver2LambdaZ |
int [] | wIndexList |
int | bridgeCounter = -1 |
![]() | |
RandomStream | otherStream |
NormalGen | normalGen |
![]() | |
RandomStream | stream |
double | delta |
double | gamma |
double | deltaOverGamma |
double | deltaSquare |
double [] | imu |
double [] | ilam |
![]() | |
boolean | observationTimesSet = false |
double | x0 = 0.0 |
int | d = -1 |
int | observationIndex = 0 |
int | observationCounter = 0 |
double [] | t |
double [] | path |
int [] | observationIndexFromCounter |
Additional Inherited Members | |
![]() | |
int | numberOfRandomStreams |
Samples the path by bridge sampling: first finding the process value at the final time and then the middle time, etc.
The method nextObservation()
returns the path value in that non-sequential order. This class uses two umontreal.ssj.rng.RandomStream ’s to generate a path [239] .
InverseGaussianProcessBridge | ( | double | s0, |
double | delta, | ||
double | gamma, | ||
RandomStream | stream, | ||
RandomStream | otherStream | ||
) |
Constructs a new InverseGaussianProcessBridge
.
The initial value s0
will be overridden by t[0] when the observation times are set.
double [] generatePath | ( | ) |
Generates the path.
The two inner umontreal.ssj.rng.RandomStream ’s are sampled alternatively.
double [] generatePath | ( | double [] | unifNorm, |
double [] | unifOther | ||
) |
Instead of using the internal streams to generate the path, it uses two arrays of uniforms U[0,1).
The length of the arrays unifNorm
and unifOther
should be equal to the number of time steps, excluding t_0.