umontreal.iro.lecuyer.stochprocess
Class GammaProcess
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.GammaProcess
-
- Direct Known Subclasses:
- GammaProcessBridge, GammaProcessPCA
public class GammaProcess extends StochasticProcess
This class represents a gamma process {S(t) = G(t;μ, ν) : t >= 0} with mean parameter μ and variance parameter ν. It is a continuous-time process with stationary, independent gamma increments such that for any Δt > 0, where X is a random variate from the gamma distribution Gamma (μ2Δt/ν, μ/ν).In this class, the gamma process is sampled sequentially using equation.
-
-
Constructor Summary
Constructors Constructor and Description GammaProcess(double s0, double mu, double nu, GammaGen Ggen)Constructs a new GammaProcess with parameters μ =mu , ν =nu and initial value S(t0) =s0 .GammaProcess(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcess 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)}.doublegetMu()Returns the value of the parameter μ.doublegetNu()Returns the value of the parameter ν.RandomStreamgetStream()Returns theRandomStreamstream.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).voidsetParams(double s0, double mu, double nu)Sets the parameters S(t0) =s0 , μ =mu and ν =nu of the process.voidsetStream(RandomStream stream)Resets theRandomStreamof theGammaGento stream.-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
generatePath, getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setObservationTimes, setObservationTimes, setX0
-
-
-
-
Constructor Detail
-
GammaProcess
public GammaProcess(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcess with parameters μ =mu , ν =nu and initial value S(t0) =s0 . The gamma variates X in are generated by inversion using stream.
-
GammaProcess
public GammaProcess(double s0, double mu, double nu, GammaGen Ggen)Constructs a new GammaProcess with parameters μ =mu , ν =nu and initial value S(t0) =s0 . The gamma variates X in are supplied by the gamma random variate generator Ggen. Note that the parameters of theGammaGenobject Ggen are not important since the implementation forces the generator to use the correct parameters (as defined above).
-
-
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 classStochasticProcess
-
nextObservation
public double nextObservation(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). 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.
-
generatePath
public double[] generatePath()
Generates, returns and saves the path {X(t0), X(t1),…, X(td)}. The gamma variates X in are generated using theRandomStreamstream or theRandomStreamincluded in theGammaGenGgen.- Specified by:
generatePathin classStochasticProcess
-
generatePath
public double[] generatePath(double[] uniform01)
Generates, 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.
-
setParams
public void setParams(double s0, double mu, double nu)Sets the parameters S(t0) =s0 , μ =mu and ν =nu of the process. Warning: This method will recompute some quantities stored internally, which may be slow if called repeatedly.
-
getMu
public double getMu()
Returns the value of the parameter μ.
-
getNu
public double getNu()
Returns the value of the parameter ν.
-
setStream
public void setStream(RandomStream stream)
Resets theRandomStreamof theGammaGento stream.- Specified by:
setStreamin classStochasticProcess
-
getStream
public RandomStream getStream()
Returns theRandomStreamstream.- Specified by:
getStreamin classStochasticProcess
-
-
DMelt 3.0 © DataMelt by jWork.ORG