Class RandomWalk
- java.lang.Object
-
- dev.nm.stat.stochasticprocess.univariate.random.RandomProcess
-
- dev.nm.stat.stochasticprocess.univariate.random.RandomWalk
-
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
public class RandomWalk extends RandomProcess
This is the Random Walk construction of a stochastic process per SDE specification.
-
-
Constructor Summary
Constructors Constructor Description RandomWalk(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
nextDouble()
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 Detail
-
RandomWalk
public RandomWalk(DiscreteSDE sde, TimeGrid timeGrid, double x0)
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
public RandomWalk(DiscreteSDE sde, double dt, double x0)
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 Detail
-
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
-
-