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

Samples the path by bridge sampling: first finding the process value at the final time and then the middle time, etc. More...

Inheritance diagram for umontreal.ssj.stochprocess.InverseGaussianProcessBridge:
umontreal.ssj.stochprocess.InverseGaussianProcessMSH umontreal.ssj.stochprocess.InverseGaussianProcess umontreal.ssj.stochprocess.StochasticProcess

Public Member Functions

 InverseGaussianProcessBridge (double s0, double delta, double gamma, RandomStream stream, RandomStream otherStream)
 Constructs a new InverseGaussianProcessBridge.
double[] generatePath ()
 Generates the path.
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)\).
double nextObservation ()
 Returns the next observation in the bridge order, not the sequential order.
void resetStartProcess ()
 Resets the observation counter to its initial value \(j=0\), so that the current observation \(X(t_j)\) becomes \(X(t_0)\).
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.
Public Member Functions inherited from umontreal.ssj.stochprocess.InverseGaussianProcessMSH
 InverseGaussianProcessMSH (double s0, double delta, double gamma, RandomStream stream, RandomStream otherStream)
 Constructs a new InverseGaussianProcessMSH.
double[] generatePath (double[] uniforms01)
 Not implemented, requires two umontreal.ssj.rng.RandomStream ’s.
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.
NormalGen getNormalGen ()
 Returns the normal generator.
Public Member Functions inherited from umontreal.ssj.stochprocess.InverseGaussianProcess
 InverseGaussianProcess (double s0, double delta, double gamma, RandomStream stream)
 Constructs a new InverseGaussianProcess.
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.
double getAnalyticVariance (double time)
 Returns the analytic variance which is \((\delta t)^2\), with.
int getNumberOfRandomStreams ()
 Returns the number of random streams of this process.
Public Member Functions inherited from umontreal.ssj.stochprocess.StochasticProcess
void setObservationTimes (double[] T, int d)
 Sets the observation times of the process to a copy of T, with.
void setObservationTimes (double delta, int d)
 Sets equidistant observation times at \(t_j = j\delta\), for.
double[] getObservationTimes ()
 Returns a reference to the array that contains the observation times.
int getNumObservationTimes ()
 Returns the number \(d\) of observation times, excluding the time \(t_0\).
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)\}\).
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.
double getObservation (int j)
 Returns \(X(t_j)\) from the current sample path.
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.
int getCurrentObservationIndex ()
 Returns the value of the index \(j\) corresponding to the time.
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.
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.

Detailed Description

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 [229] .

Definition at line 46 of file InverseGaussianProcessBridge.java.

Constructor & Destructor Documentation

◆ InverseGaussianProcessBridge()

umontreal.ssj.stochprocess.InverseGaussianProcessBridge.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.

Definition at line 60 of file InverseGaussianProcessBridge.java.

Member Function Documentation

◆ generatePath() [1/2]

double[] umontreal.ssj.stochprocess.InverseGaussianProcessBridge.generatePath ( )

Generates the path.

The two inner

umontreal.ssj.rng.RandomStream ’s are sampled alternatively.

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 71 of file InverseGaussianProcessBridge.java.

◆ generatePath() [2/2]

double[] umontreal.ssj.stochprocess.InverseGaussianProcessBridge.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\).

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 85 of file InverseGaussianProcessBridge.java.

◆ getStream()

RandomStream umontreal.ssj.stochprocess.InverseGaussianProcessBridge.getStream ( )

Only returns a stream if both inner streams are the same.

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 234 of file InverseGaussianProcessBridge.java.

◆ nextObservation()

double umontreal.ssj.stochprocess.InverseGaussianProcessBridge.nextObservation ( )

Returns the next observation in the bridge order, not the sequential order.

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 108 of file InverseGaussianProcessBridge.java.

◆ resetStartProcess()

void umontreal.ssj.stochprocess.InverseGaussianProcessBridge.resetStartProcess ( )

Resets the observation counter to its initial value \(j=0\), so that the current observation \(X(t_j)\) becomes \(X(t_0)\).

This method should be invoked before generating observations sequentially one by one via nextObservation, for a new sample path.

Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.

Definition at line 145 of file InverseGaussianProcessBridge.java.

◆ setStream() [1/2]

void umontreal.ssj.stochprocess.InverseGaussianProcessBridge.setStream ( RandomStream stream)

Sets both inner streams to the same stream.

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 252 of file InverseGaussianProcessBridge.java.

◆ setStream() [2/2]

void umontreal.ssj.stochprocess.InverseGaussianProcessBridge.setStream ( RandomStream stream,
RandomStream otherStream )

Sets the streams.

Reimplemented from umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 243 of file InverseGaussianProcessBridge.java.


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