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

The inverse Gaussian process is a non-decreasing process where the increments are additive and are given by the inverse gaussian distribution, umontreal.ssj.probdist.InverseGaussianDist. More...

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

Public Member Functions

 InverseGaussianProcess (double s0, double delta, double gamma, RandomStream stream)
 Constructs a new InverseGaussianProcess.
double[] generatePath ()
 Generates, returns, and saves the sample path \(\{X(t_0), X(t_1), \dots, X(t_d)\}\).
double[] generatePath (double[] uniforms01)
 Instead of using the internal stream to generate the path, uses an array of uniforms \(U[0,1)\).
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 ()
 Generates and returns the next observation \(X(t_j)\) of the stochastic process.
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.
RandomStream getStream ()
 Returns the random stream of the underlying generator.
void setStream (RandomStream stream)
 Resets the random stream of the underlying generator to stream.
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.
void resetStartProcess ()
 Resets the observation counter to its initial value \(j=0\), so that the current observation \(X(t_j)\) becomes \(X(t_0)\).
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

The inverse Gaussian process is a non-decreasing process where the increments are additive and are given by the inverse gaussian distribution, umontreal.ssj.probdist.InverseGaussianDist.

With parameters \(\delta\) and \(\gamma\), the time increments are given by umontreal.ssj.probdist.InverseGaussianDist \((\delta dt/\gamma, \delta^2 dt^2)\).

[We here use the inverse gaussian distribution parametrized with IGDist \((\mu,\lambda)\), where \(\mu=\delta/\gamma\) and

\(\lambda=\delta^2\). If we instead used the parametrization \(IGDist^{\star}(\delta, \gamma)\), then the increment distribution of our process would have been written more simply as \(IGDist^{\star}(\delta dt, \gamma)\).]

                     The increments are generated by using the inversion
                     of the cumulative distribution function. It
                     therefore uses only one

umontreal.ssj.rng.RandomStream. Subclasses of this class use different generating methods and some need two umontreal.ssj.rng.RandomStream ’s.

 The initial value of this process is the initial observation time.

 <div class="SSJ-bigskip"></div><div class="SSJ-bigskip"></div>

Definition at line 58 of file InverseGaussianProcess.java.

Constructor & Destructor Documentation

◆ InverseGaussianProcess()

umontreal.ssj.stochprocess.InverseGaussianProcess.InverseGaussianProcess ( double s0,
double delta,
double gamma,
RandomStream stream )

Constructs a new InverseGaussianProcess.

The initial value \(s0\) will be overridden by \(t[0]\) when the observation times are set.

Definition at line 84 of file InverseGaussianProcess.java.

Member Function Documentation

◆ generatePath() [1/3]

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

Generates, returns, and saves the sample path \(\{X(t_0), X(t_1), \dots, X(t_d)\}\).

It can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type.

Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.

Reimplemented in umontreal.ssj.stochprocess.InverseGaussianProcessBridge, umontreal.ssj.stochprocess.InverseGaussianProcessMSH, and umontreal.ssj.stochprocess.InverseGaussianProcessPCA.

Definition at line 91 of file InverseGaussianProcess.java.

◆ generatePath() [2/3]

double[] umontreal.ssj.stochprocess.InverseGaussianProcess.generatePath ( double[] uniforms01)

Instead of using the internal stream to generate the path, uses an array of uniforms \(U[0,1)\).

The array should be of the length of the number of periods in the observation times. This method is useful for

NormalInverseGaussianProcess.

Reimplemented in umontreal.ssj.stochprocess.InverseGaussianProcessMSH, and umontreal.ssj.stochprocess.InverseGaussianProcessPCA.

Definition at line 109 of file InverseGaussianProcess.java.

◆ generatePath() [3/3]

double[] umontreal.ssj.stochprocess.InverseGaussianProcess.generatePath ( double[] uniforms01,
double[] uniforms01b )

This method does not work for this class, but will be useful for the subclasses that require two streams.

Reimplemented in umontreal.ssj.stochprocess.InverseGaussianProcessBridge, and umontreal.ssj.stochprocess.InverseGaussianProcessMSH.

Definition at line 124 of file InverseGaussianProcess.java.

◆ getAnalyticAverage()

double umontreal.ssj.stochprocess.InverseGaussianProcess.getAnalyticAverage ( double time)

Returns the analytic average which is \(\delta t/ \gamma\), with.

\(t=\) time.

Definition at line 167 of file InverseGaussianProcess.java.

◆ getAnalyticVariance()

double umontreal.ssj.stochprocess.InverseGaussianProcess.getAnalyticVariance ( double time)

Returns the analytic variance which is \((\delta t)^2\), with.

\(t=\) time.

Definition at line 176 of file InverseGaussianProcess.java.

◆ getDelta()

double umontreal.ssj.stochprocess.InverseGaussianProcess.getDelta ( )

Returns \(\delta\).

Definition at line 151 of file InverseGaussianProcess.java.

◆ getGamma()

double umontreal.ssj.stochprocess.InverseGaussianProcess.getGamma ( )

Returns \(\gamma\).

Definition at line 158 of file InverseGaussianProcess.java.

◆ getNumberOfRandomStreams()

int umontreal.ssj.stochprocess.InverseGaussianProcess.getNumberOfRandomStreams ( )

Returns the number of random streams of this process.

It is useful because some subclasses use different number of streams. It returns 1 for

InverseGaussianProcess.

Definition at line 211 of file InverseGaussianProcess.java.

◆ getStream()

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

◆ nextObservation()

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

Generates and returns the next observation \(X(t_j)\) of the stochastic process.

The processes are usually sampled sequentially, i.e. if the last observation generated was for time

\(t_{j-1}\), the next observation returned will be for time \(t_j\). In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the \(t_j\)’s is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.

Reimplemented from umontreal.ssj.stochprocess.StochasticProcess.

Reimplemented in umontreal.ssj.stochprocess.InverseGaussianProcessBridge, umontreal.ssj.stochprocess.InverseGaussianProcessMSH, and umontreal.ssj.stochprocess.InverseGaussianProcessPCA.

Definition at line 128 of file InverseGaussianProcess.java.

◆ setParams()

void umontreal.ssj.stochprocess.InverseGaussianProcess.setParams ( double delta,
double gamma )

Sets the parameters.

Definition at line 140 of file InverseGaussianProcess.java.

◆ setStream()

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

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