umontreal.iro.lecuyer.stochprocess
Class GammaProcessSymmetricalBridge
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.GammaProcess
-
- umontreal.iro.lecuyer.stochprocess.GammaProcessBridge
-
- umontreal.iro.lecuyer.stochprocess.GammaProcessSymmetricalBridge
-
public class GammaProcessSymmetricalBridge extends GammaProcessBridge
This class differs from GammaProcessBridge only in that it requires the number of interval of the path to be a power of 2 and of equal size. It is then possible to generate the bridge process using a special implementation of the beta random variate generator (using the symmetrical beta distribution) that is much faster (HOW MUCH? QUANTIFY!) than the general case. Note that when the method setObservationTimes is called, the equality of the size of the time steps is verified. To allow for differences due to floating point errors, time steps are considered to be equal if their relative difference is less than 10-15.
-
-
Constructor Summary
Constructors Constructor and Description GammaProcessSymmetricalBridge(double s0, double mu, double nu, GammaGen Ggen, BetaSymmetricalGen BSgen)Constructs a new GammaProcessSymmetricalBridge with parameters μ =mu , ν =nu and initial value S(t0) =s0 .GammaProcessSymmetricalBridge(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcessSymmetricalBridge 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).-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.GammaProcessBridge
resetStartProcess, setStream
-
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
-
GammaProcessSymmetricalBridge
public GammaProcessSymmetricalBridge(double s0, double mu, double nu, RandomStream stream)Constructs a new GammaProcessSymmetricalBridge with parameters μ =mu , ν =nu and initial value S(t0) =s0 . The random variables are created using theRandomStreamstream. Note that the sameRandomStreamstream is used for theGammaGenand for theBetaSymmetricalGeninluded in this class.
-
GammaProcessSymmetricalBridge
public GammaProcessSymmetricalBridge(double s0, double mu, double nu, GammaGen Ggen, BetaSymmetricalGen BSgen)Constructs a new GammaProcessSymmetricalBridge with parameters μ =mu , ν =nu and initial value S(t0) =s0 . Note that theRandomStreamincluded in theBetaSymmetricalGenis sets to the one included in theGammaGento avoid confusion. ThisRandomStreamis then used to generate all the random variables.
-
-
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 classGammaProcessBridge
-
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 classGammaProcessBridge
-
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 classGammaProcessBridge
-
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 classGammaProcessBridge
-
-
DMelt 3.0 © DataMelt by jWork.ORG