This class represents a gamma process \(\{ S(t) = G(t; \mu, \nu) : t \geq0 \}\) with mean parameter \(\mu\) and variance parameter. More...
Public Member Functions | |
| GammaProcessBridge (double s0, double mu, double nu, RandomStream stream) | |
| Constructs a new GammaProcessBridge with parameters \(\mu=
\mathtt{mu}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) =
\mathtt{s0}\). | |
| GammaProcessBridge (double s0, double mu, double nu, GammaGen Ggen, BetaGen Bgen) | |
| Constructs a new GammaProcessBridge. | |
| double | nextObservation () |
| Generates and returns the next observation \(X(t_j)\) of the stochastic process. | |
| double | nextObservation (double nextT) |
| Generates and returns the next observation at time \(t_{j+1} =
\mathtt{nextTime}\), using the previous observation time \(t_j\) defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation \(X(t_j)\). | |
| double[] | generatePath (double[] uniform01) |
| Generates, returns and saves the path \( \{X(t_0), X(t_1), …, X(t_d)\}\). | |
| double[] | generatePath () |
| Generates, returns and saves the path \(\{X(t_0), X(t_1), …, X(t_d)\}\). | |
| void | resetStartProcess () |
| Resets the observation counter to its initial value \(j=0\), so that the current observation \(X(t_j)\) becomes \(X(t_0)\). | |
| void | setStream (RandomStream stream) |
| Resets the umontreal.ssj.rng.RandomStream of the. | |
| Public Member Functions inherited from umontreal.ssj.stochprocess.GammaProcess | |
| GammaProcess (double s0, double mu, double nu, RandomStream stream) | |
| Constructs a new GammaProcess with parameters \(\mu=
\mathtt{mu}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) =
\mathtt{s0}\). | |
| GammaProcess (double s0, double mu, double nu, GammaGen Ggen) | |
| Constructs a new GammaProcess with parameters \(\mu=
\mathtt{mu}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) =
\mathtt{s0}\). | |
| void | setParams (double s0, double mu, double nu) |
| Sets the parameters \(S(t_0) = \mathtt{s0}\), \(\mu= \mathtt{mu}\) and \(\nu= \mathtt{nu}\) of the process. | |
| double | getMu () |
| Returns the value of the parameter \(\mu\). | |
| double | getNu () |
| Returns the value of the parameter \(\nu\). | |
| RandomStream | getStream () |
| Returns the umontreal.ssj.rng.RandomStream stream. | |
| 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. | |
This class represents a gamma process \(\{ S(t) = G(t; \mu, \nu) : t \geq0 \}\) with mean parameter \(\mu\) and variance parameter.
\(\nu\), sampled using the gamma bridge method (see for example [201], [10] ). This is analogous to the bridge sampling used in BrownianMotionBridge.
Note that gamma bridge sampling requires not only gamma variates, but also beta variates. The latter generally take a longer time to generate than the former. The class GammaSymmetricalBridgeProcess provides a faster implementation when the number of observation times is a power of two.
The warning from class BrownianMotionBridge applies verbatim to this class.
Definition at line 51 of file GammaProcessBridge.java.
| umontreal.ssj.stochprocess.GammaProcessBridge.GammaProcessBridge | ( | double | s0, |
| double | mu, | ||
| double | nu, | ||
| RandomStream | stream ) |
Constructs a new GammaProcessBridge with parameters \(\mu= \mathtt{mu}\), \(\nu= \mathtt{nu}\) and initial value \(S(t_0) = \mathtt{s0}\).
Uses stream to generate the gamma and beta variates by inversion.
Definition at line 65 of file GammaProcessBridge.java.
| umontreal.ssj.stochprocess.GammaProcessBridge.GammaProcessBridge | ( | double | s0, |
| double | mu, | ||
| double | nu, | ||
| GammaGen | Ggen, | ||
| BetaGen | Bgen ) |
Constructs a new GammaProcessBridge.
Uses the random variate generators Ggen and Bgen to generate the gamma and beta variates, respectively. Note that both generator uses the same
umontreal.ssj.rng.RandomStream. Furthermore, the parameters of the umontreal.ssj.randvar.GammaGen and umontreal.ssj.randvar.BetaGen objects are not important since the implementation forces the generators to use the correct parameters. (as defined in [201] (page 7)).
Definition at line 80 of file GammaProcessBridge.java.
| double[] umontreal.ssj.stochprocess.GammaProcessBridge.generatePath | ( | ) |
Generates, returns and saves the path \(\{X(t_0), X(t_1), …, X(t_d)\}\).
The gamma variates \(X\) in ( GammaEqn ) are generated using the
umontreal.ssj.rng.RandomStream stream or the umontreal.ssj.rng.RandomStream included in the umontreal.ssj.randvar.GammaGen Ggen.
Reimplemented from umontreal.ssj.stochprocess.GammaProcess.
Reimplemented in umontreal.ssj.stochprocess.GammaProcessSymmetricalBridge.
Definition at line 171 of file GammaProcessBridge.java.
| double[] umontreal.ssj.stochprocess.GammaProcessBridge.generatePath | ( | double[] | uniform01 | ) |
Generates, returns and saves the path \( \{X(t_0), X(t_1), …, X(t_d)\}\).
This method does not use the
umontreal.ssj.rng.RandomStream stream nor the umontreal.ssj.randvar.GammaGen Ggen. It uses the vector of uniform random numbers \(U(0, 1)\) provided by the user and generates the path by inversion. The vector uniform01 must be of dimension \(d\).
Reimplemented from umontreal.ssj.stochprocess.GammaProcess.
Reimplemented in umontreal.ssj.stochprocess.GammaProcessSymmetricalBridge.
Definition at line 148 of file GammaProcessBridge.java.
| double umontreal.ssj.stochprocess.GammaProcessBridge.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.GammaProcess.
Reimplemented in umontreal.ssj.stochprocess.GammaProcessSymmetricalBridge.
Definition at line 87 of file GammaProcessBridge.java.
| double umontreal.ssj.stochprocess.GammaProcessBridge.nextObservation | ( | double | nextT | ) |
Generates and returns the next observation at time \(t_{j+1} = \mathtt{nextTime}\), using the previous observation time \(t_j\) defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation \(X(t_j)\).
Warning: This method will reset the observations time \(t_{j+1}\) for this process to nextT. The user must make sure that the \(t_{j+1}\) supplied is \(\geq t_j\).
Reimplemented from umontreal.ssj.stochprocess.GammaProcess.
Reimplemented in umontreal.ssj.stochprocess.GammaProcessSymmetricalBridge.
Definition at line 114 of file GammaProcessBridge.java.
| void umontreal.ssj.stochprocess.GammaProcessBridge.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 193 of file GammaProcessBridge.java.
| void umontreal.ssj.stochprocess.GammaProcessBridge.setStream | ( | RandomStream | stream | ) |
Resets the umontreal.ssj.rng.RandomStream of the.
umontreal.ssj.randvar.GammaGen and the umontreal.ssj.randvar.BetaGen to stream.
Reimplemented from umontreal.ssj.stochprocess.GammaProcess.
Definition at line 264 of file GammaProcessBridge.java.