1package umontreal.ssj.markovchainrqmc;
3import umontreal.ssj.rng.*;
4import umontreal.ssj.stat.Tally;
33 protected double state = 0;
34 protected int step = 0;
35 protected double perf = 0;
98 return state == Double.POSITIVE_INFINITY;
107 return (state < os ? -1 : (state > os ? 1 : 0));
118 for (step = 0; step < numSteps && !
hasStopped(); ++step) {
132 for (
int i = 0; i < n; i++) {
A subclass of MarkovChain for which there is a total ordering between the states, induced by the impl...
A special kind of Markov chain whose state space is a subset of the real numbers.
double simulStepsDouble(int numSteps, RandomStream stream)
After invoking initialStateDouble, starts a new simulation run, simulates numSteps steps of the Marko...
void initialState()
Sets the Markov chain to its (deterministic) initial state and initializes the collectors for the per...
double getPerformance()
Returns the value of perf which is computed when a chain stops.
void simulRunsWithSubstreams(int n, int numSteps, RandomStream stream, Tally statRuns)
Same as simulRuns, except that the stream is first reset to its initial seed and then reset to the fi...
double getPerformance(int numSteps)
Returns the performance mesure associated with current state, which may depend on the number of steps...
abstract double nextStepDouble(int step, double s, RandomStream stream)
Simulates one step of the chain, from state s, using stream for the randomness, assuming we are at st...
abstract double getPerformanceDouble(double state, int numSteps)
Returns the performance measure associated with state state, which may depend on the number of steps ...
void nextStep(RandomStream stream)
Simulates one more step of the chain, from its current state, using stream for the randomness.
int getStateDimension()
Returns the dimension of the state.
boolean hasStopped()
Indicates if the chain has stopped.
abstract double initialStateDouble()
Returns the initial (deterministic) state.
void init()
Initializes the statistical collector.
void add(double x)
Gives a new observation x to the statistical collector.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
void resetNextSubstream()
Reinitializes the stream to the beginning of its next substream:
void resetStartStream()
Reinitializes the stream to its initial state : and are set to .