|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.stochprocess.StochasticProcess
public abstract class StochasticProcess
Abstract base class for a stochastic process {X(t) : t >= 0} sampled (or observed) at a finite number of time points, 0 = t0 < t1 < ... < td. The observation times are usually all specified before generating a sample path. This can be done via setObservationTimes. The method generatePath generates X(t1),..., X(td) and memorizes them in a vector, which can be recovered by getPath.
Alternatively, for some types of processes, the observations X(tj) can be generated sequentially, one at a time, by invoking resetStartProcess first, and then nextObservation repeatedly. For some types of processes, the observation times can be specified one by one as well, when generating the path. This may be convenient or even necessary if the observation times are random, for example.
WARNING: After having called the constructor for one of the subclass, one must always set the observation times of the process, by calling method setObservationTimes for example or otherwise.
Constructor Summary | |
---|---|
StochasticProcess()
|
Method Summary | |
---|---|
abstract double[] |
generatePath()
Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. |
double[] |
generatePath(RandomStream stream)
Same as generatePath(), but first resets the stream to stream. |
int[] |
getArrayMappingCounterToIndex()
Returns a reference to an array that maps an integer k to ik, the index of the observation S(tik) corresponding to the k-th observation to be generated for a sample path of this process. |
double |
getCurrentObservation()
Returns the value of the last generated observation X(tj). |
int |
getCurrentObservationIndex()
Returns the value of the index j corresponding to the time tj of the last generated observation. |
int |
getNbObservationTimes()
Returns the number of observation times excluding the time t0. |
double |
getObservation(int j)
Returns X(tj) from the current sample path. |
double[] |
getObservationTimes()
Returns a reference to the array that contains the observation times (t0,..., td). |
double[] |
getPath()
Returns a reference to the last generated sample path {X(t0),..., X(td)}. |
abstract RandomStream |
getStream()
Returns the random stream of the underlying generator. |
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 tj whose indices j are in the array pathIndices. |
double |
getX0()
Returns the initial value X(t0) for this process. |
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 . |
double |
nextObservation()
Generates and returns the next observation X(tj) of the stochastic process. |
void |
resetStartProcess()
Resets the observation counter to its initial value j = 0, so that the current observation X(tj) becomes X(t0). |
void |
setObservationTimes(double[] T,
int d)
Sets the observation times of the process to a copy of T, with t0 = T[0] and td = T[d]. |
void |
setObservationTimes(double delta,
int d)
Sets equidistant observation times at tj = jδ, for j = 0,..., d, and delta = δ. |
abstract void |
setStream(RandomStream stream)
Resets the random stream of the underlying generator to stream. |
void |
setX0(double s0)
Sets the initial value X(t0) for this process to s0, and reinitializes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StochasticProcess()
Method Detail |
---|
public void setObservationTimes(double[] T, int d)
public void setObservationTimes(double delta, int d)
public double[] getObservationTimes()
public int getNbObservationTimes()
public abstract double[] generatePath()
public double[] generatePath(RandomStream stream)
public double[] getPath()
public void getSubpath(double[] subpath, int[] pathIndices)
public double getObservation(int j)
public void resetStartProcess()
nextObservation
, for a new sample path.
public boolean hasNextObservation()
resetStartProcess
.
Otherwise returns false.
public double nextObservation()
public int getCurrentObservationIndex()
public double getCurrentObservation()
public double getX0()
public void setX0(double s0)
public abstract void setStream(RandomStream stream)
public abstract RandomStream getStream()
public int[] getArrayMappingCounterToIndex()
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |