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 doublenextDouble()Get the next randomdouble.voidseed(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:SeedableSeed the random number/vector/scenario generator to produce repeatable experiments.- Specified by:
seedin interfaceSeedable- Overrides:
seedin classRandomProcess- Parameters:
seeds- the seeds
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGeneratorGet the next randomdouble.- Returns:
- the next random number
-
-