SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.univariate.integration.sde
Class PathByIdImpl

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.stochasticprocess.univariate.integration.sde.PathByIdImpl

public class PathByIdImpl
extends java.lang.Object

This class implements some common methods to identify a path or a trajectory of a realization of a stochastic process. We tag each path by an ID so that there is a 1-1 correspondence between a realization and an identifier. Also, the same seed should give arise to the same realization for the purpose of repeated experiments.


Field Summary
 TimeGrid timePoints
          the set of discretized time points
 
Constructor Summary
PathByIdImpl(TimeGrid timePoints)
          Construct a PathByIdImpl instance.
 
Method Summary
 long nextId()
          Generate an ID for this particular path.
 void seed(long seed)
          Seed the random number generator to produce repeatable realizations.
 int size()
          the number of time points
 double t(int pos)
          the pos-th time point in the time grid discretization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timePoints

public final TimeGrid timePoints
the set of discretized time points

Constructor Detail

PathByIdImpl

public PathByIdImpl(TimeGrid timePoints)
Construct a PathByIdImpl instance.

Parameters:
timePoints - specifying the time points in a grid
Method Detail

size

public int size()
the number of time points

Returns:
the number of time points

t

public double t(int pos)
the pos-th time point in the time grid discretization

Parameters:
pos - the index to the grid point
Returns:
tpos

seed

public void seed(long seed)
Seed the random number generator to produce repeatable realizations.

Parameters:
seed - the seed

nextId

public long nextId()
Generate an ID for this particular path. There is a 1-1 correspondence between a path and an ID.

Returns:
a path ID

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.