umontreal.iro.lecuyer.stochprocess
Class GammaProcessBridge
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.GammaProcess
-
- umontreal.iro.lecuyer.stochprocess.GammaProcessBridge
-
- Direct Known Subclasses:
- GammaProcessSymmetricalBridge
public class GammaProcessBridge extends GammaProcess
This class represents a gamma process {S(t) = G(t;μ, ν) : t >= 0} with mean parameter μ and variance parameter ν, sampled using the gamma bridge method (see for example). This is analogous to the bridge sampling used inBrownianMotionBridge.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
BrownianMotionBridgeapplies verbatim to this class.
-
-
Constructor Summary
Constructors Constructor and Description GammaProcessBridge(double s0, double mu, double nu, GammaGen Ggen, BetaGen Bgen)Constructs a new GammaProcessBridge.GammaProcessBridge(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcessBridge with parameters μ =mu , ν =nu and initial value S(t0) =s0 .
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]generatePath()Generates, returns and saves the path {X(t0), X(t1),…, X(td)}.double[]generatePath(double[] uniform01)Generates, returns and saves the path {X(t0), X(t1),…, X(td)}.doublenextObservation()Generates and returns the next observation X(tj) of the stochastic process.doublenextObservation(double nextT)Generates and returns the next observation at time tj+1 =nextTime , using the previous observation time tj defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation X(tj).voidresetStartProcess()Resets the observation counter to its initial value j = 0, so that the current observation X(tj) becomes X(t0).voidsetStream(RandomStream stream)-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.GammaProcess
getMu, getNu, getStream, setParams
-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, setObservationTimes, setObservationTimes, setX0
-
-
-
-
Constructor Detail
-
GammaProcessBridge
public GammaProcessBridge(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcessBridge with parameters μ =mu , ν =nu and initial value S(t0) =s0 . Uses stream to generate the gamma and beta variates by inversion.
-
GammaProcessBridge
public 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 sameRandomStream. Furthermore, the parameters of theGammaGenandBetaGenobjects are not important since the implementation forces the generators to use the correct parameters. (as defined in).
-
-
Method Detail
-
nextObservation
public double nextObservation()
Description copied from class:StochasticProcessGenerates and returns the next observation X(tj) of the stochastic process. The processes are usually sampled sequentially, i.e. if the last observation generated was for time tj-1, the next observation returned will be for time tj. In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the tj's is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.- Overrides:
nextObservationin classGammaProcess
-
nextObservation
public double nextObservation(double nextT)
Description copied from class:GammaProcessGenerates and returns the next observation at time tj+1 =nextTime , using the previous observation time tj defined earlier (either by this method or by setObservationTimes), as well as the value of the previous observation X(tj). Warning: This method will reset the observations time tj+1 for this process to nextT. The user must make sure that the tj+1 supplied is >= tj.- Overrides:
nextObservationin classGammaProcess
-
generatePath
public double[] generatePath(double[] uniform01)
Description copied from class:GammaProcessGenerates, returns and saves the path {X(t0), X(t1),…, X(td)}. This method does not use theRandomStreamstream nor theGammaGenGgen. 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.- Overrides:
generatePathin classGammaProcess
-
generatePath
public double[] generatePath()
Description copied from class:GammaProcessGenerates, returns and saves the path {X(t0), X(t1),…, X(td)}. The gamma variates X in are generated using theRandomStreamstream or theRandomStreamincluded in theGammaGenGgen.- Overrides:
generatePathin classGammaProcess
-
resetStartProcess
public void resetStartProcess()
Description copied from class:StochasticProcessResets the observation counter to its initial value j = 0, so that the current observation X(tj) becomes X(t0). This method should be invoked before generating observations sequentially one by one vianextObservation, for a new sample path.- Overrides:
resetStartProcessin classStochasticProcess
-
setStream
public void setStream(RandomStream stream)
- Overrides:
setStreamin classGammaProcess
-
-
DMelt 3.0 © DataMelt by jWork.ORG