SSJ
3.3.1
Stochastic Simulation in Java
|
Monte Carlo sampler. More...
Public Member Functions | |
MonteCarloSampler (int nSamples) | |
MonteCarloSampler (int nSamples, RandomStream stream) | |
RandomStream | getStream () |
Returns the currently used random stream. More... | |
int | getNumSimulationsPerSample () |
Returns the number of times the model is simulated each time a sample is produced. More... | |
int | getNumSamples () |
Returns the number of samples produced each time the simulateRuns() method is called. More... | |
void | setNumSamples (int nSamples) |
Sets the number of samples. | |
void | setStream (RandomStream stream) |
Use stream to produce random points. More... | |
void | simulateRuns (MonteCarloModelDouble model, Tally collector) |
More... | |
String | toString () |
Protected Attributes | |
int | nSamples |
RandomStream | stream |
Package Functions | |
public< E > void | simulateRuns (MonteCarloModel<? extends E > model, ObservationCollector< E > collector) |
More... | |
Monte Carlo sampler.
The samples produced by this class are random and independent if the underlying random stream produces random and independent outputs.
int getNumSamples | ( | ) |
Returns the number of samples produced each time the simulateRuns() method is called.
Implements Sampler.
int getNumSimulationsPerSample | ( | ) |
Returns the number of times the model is simulated each time a sample is produced.
Implements Sampler.
RandomStream getStream | ( | ) |
void setStream | ( | RandomStream | stream | ) |
Use stream
to produce random points.
Sets the internal random stream to stream
.
Implements RandomSampler.
|
package |
Implements Sampler.
void simulateRuns | ( | MonteCarloModelDouble | model, |
Tally | collector | ||
) |
Implements Sampler.