Class StochasticState
State for stochastic executors — a seeded PRNG. Deterministic given the seed, reproducible across runs. Mutable: the PRNG seed evolves as the executor steps.
public sealed class StochasticState : IExecutionState
- Inheritance
-
StochasticState
- Implements
- Inherited Members
Constructors
StochasticState(int)
Construct a stochastic state from a seed.
public StochasticState(int seed)
Parameters
seedintInitial PRNG seed.
Properties
Seed
Current PRNG seed (mutable).
public int Seed { get; set; }
Property Value
Methods
NextNormal(double, double)
Generate a normally-distributed value via Box-Muller (approximate).
public double NextNormal(double mean = 0, double stddev = 1)
Parameters
Returns
NextRandom()
Simple linear-congruential PRNG step.
public int NextRandom()
Returns
NextUnit()
Generate a uniform random number in [0, 1).
public double NextUnit()