Class RandomWalk
java.lang.Object
dev.nm.stat.stochasticprocess.univariate.random.RandomProcess
dev.nm.stat.stochasticprocess.univariate.random.RandomWalk
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
This is the Random Walk construction of a stochastic process per SDE
specification.
-
Constructor Summary
ConstructorsConstructorDescriptionRandomWalk
(DiscreteSDE sde, double dt, double x0) Constructs a univariate stochastic process from an SDE.RandomWalk
(DiscreteSDE sde, TimeGrid timeGrid, double x0) Constructs a univariate stochastic process from an SDE. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the next randomdouble
.void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.Methods inherited from class dev.nm.stat.stochasticprocess.univariate.random.RandomProcess
dB, nextTime, time, Zt
-
Constructor Details
-
RandomWalk
Constructs a univariate stochastic process from an SDE.- Parameters:
sde
- a discrete SDEtimeGrid
- specifying the time points in a gridx0
- the initial value of the process
-
RandomWalk
Constructs a univariate stochastic process from an SDE.- Parameters:
sde
- a discrete SDEdt
- the grid space for a uniform time gridx0
- the initial value of the process
-
-
Method Details
-
seed
public void seed(long... seeds) Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments.- Specified by:
seed
in interfaceSeedable
- Overrides:
seed
in classRandomProcess
- Parameters:
seeds
- the seeds
-
nextDouble
public double nextDouble()Description copied from interface:RandomNumberGenerator
Get the next randomdouble
.- Returns:
- the next random number
-