

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object Processes.VectorProcess
Abstract class implementing some methods for an ndimensional stochastic * process X(t) and leaving process specific details abstract to be overridden * in concrete subclasses.
* * The values X(t) are arrays of size double[dim], where dim is the
* dimension of the process.
* The only abstract method is timeStep(int)
. All other methods provide
* default implementations. In other words if you want a concrete vector
* stochastic process all you need to do is to subclass from VectorProcess and
* to define this one method or to call the constructor and define the method
* in the body of the constructor call.
Path computation: the basic procedure is to continue a path * which has already been realized until time t from time t to the horizon * (branching at time t). * Here we are simulating future scenarios conditional on the state at time t. * This is what is needed for the computation of conditional expectations * conditioning on all information available at time t. The computation of * entire paths is then merely a continuation from time t=0.
* *Time is measured in discrete units (the time step dt). Integer time t * corresponds to continuous time t*dt. The case dt=1 is the special case of a * sequential process.
* * @author Michael J. Meyer
Constructor Summary  
VectorProcess(int dim,
int T,
double dt,
double[] X_0)
Constructor performing all initializations but leaving the abstract * method timeStep(int) undefined. 
Method Summary  
int 
get_dim()
Dimension of process. 
double 
get_dt()
Size of time step. 
double[][] 
get_path()
Reference to array containing the (vectorial) path of the process X * ( this ). 
int 
get_T()
Number of time steps to horizon. 
double[] 
get_X_0()
Initial value X(0). 
void 
newPathBranch()
Computes a new path from time t=0. 
void 
newPathBranch(int t)
Continues a path existing on [0,t] from time t to * the horizon (branching a given path at time t), that is, * computes path[s], s=t+1,...,T, from path[u], u<=t. 
void 
pathSegment(int t,
int s)
Computes a new path segment from time t to time s through all * intermediate times t+1,...,s1. 
int 
pathSegment(int t,
StoppingTime tau)
Computes a new path segment from time t to the random time tau. 
int 
pathSegment(StoppingTime tau)
Computes a new path segment from time t=0 to the random time tau. 
RandomVector 
sampledAt(StoppingTime tau)
Computes the random vector X_tau (X sampled at the * stopping time tau) where X is the current VectorProcess * ( this ). 
void 
simulationInit(int t)
Sets up a path simulation (t=0) or a simulation of * branches of an existing path (t>0, conditional expectations). 
abstract void 
timeStep(int t)
Evolves the path from discrete time [0,t] to time t+1, * that is, computes path[t+1] from path[u], u<=t. 
void 
timeStep(int t,
int s)
Computes path[s] from path[u], u<=t. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 
public VectorProcess(int dim, int T, double dt, double[] X_0)
Constructor performing all initializations but leaving the abstract
* method timeStep(int)
undefined.
Method Detail 
public int get_dim()
Dimension of process.
public int get_T()
Number of time steps to horizon.
public double get_dt()
Size of time step.
public double[] get_X_0()
Initial value X(0).
public double[][] get_path()
Reference to array containing the (vectorial) path of the process X
* (this
). path[t]=X(t*dt) is a double[]
* of size dim since X(t*dt) is a dim dimensional vector.
public void simulationInit(int t)
Sets up a path simulation (t=0) or a simulation of * branches of an existing path (t>0, conditional expectations). * Default: empty, nothing to do.
* * @param t current time.
public abstract void timeStep(int t)
Evolves the path from discrete time [0,t] to time t+1, * that is, computes path[t+1] from path[u], u<=t.
* * @param t current time.
public void newPathBranch(int t)
Continues a path existing on [0,t] from time t to * the horizon (branching a given path at time t), that is, * computes path[s], s=t+1,...,T, from path[u], u<=t.
* * Default implementation: calls to timeStep. * This is not the most efficient method, override if fastest * path computation is a concern. * * @param t time of branching.
public void newPathBranch()
Computes a new path from time t=0.
public void timeStep(int t, int s)
Computes path[s] from path[u], u<=t.
* *Sometimes this can be accomplished in a single step without stepping * through intermediate times t+1,...,s1. In this case path computations * can often be sped up by sampling the path only at the times s which are * needed.
* *Default: individual time steps, no efficiency gain. * This is meant to be overridden where possible but a default is * provided for convenience.
* * @param t current time. * @param s future time.
public void pathSegment(int t, int s)
Computes a new path segment from time t to time s through all * intermediate times t+1,...,s1. * Default implementation: calls to timeStep.
* * @param t current time. * @param s future time.
public int pathSegment(int t, StoppingTime tau)
Computes a new path segment from time t to the random time tau. * Default implementation: calls to timeStep.
* * @param t current time. * @param tau random future time. * @return Value of the time tau when the path is stopped.
public int pathSegment(StoppingTime tau)
Computes a new path segment from time t=0 to the random time tau.
* Default implementation: calls to timeStep
.
public RandomVector sampledAt(StoppingTime tau)
Computes the random vector X_tau (X sampled at the
* stopping time tau) where X is the current VectorProcess
* (this
).
this
) X is sampled.
* @return (this
) X sampled at the stopping time tau.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 