SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Protected Attributes | Package Functions | List of all members
MonteCarloSampler Class Reference

Monte Carlo sampler. More...

Inheritance diagram for MonteCarloSampler:
[legend]
Collaboration diagram for MonteCarloSampler:
[legend]

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...
 

Detailed Description

Monte Carlo sampler.

The samples produced by this class are random and independent if the underlying random stream produces random and independent outputs.

Member Function Documentation

◆ getNumSamples()

int getNumSamples ( )

Returns the number of samples produced each time the simulateRuns() method is called.

Implements Sampler.

◆ getNumSimulationsPerSample()

int getNumSimulationsPerSample ( )

Returns the number of times the model is simulated each time a sample is produced.

Implements Sampler.

◆ getStream()

RandomStream getStream ( )

Returns the currently used random stream.

May be null.

Implements RandomSampler.

◆ setStream()

void setStream ( RandomStream  stream)

Use stream to produce random points.

Sets the internal random stream to stream.

Implements RandomSampler.

◆ simulateRuns() [1/2]

public<E> void simulateRuns ( MonteCarloModel<? extends E >  model,
ObservationCollector< E >  collector 
)
package


Implements Sampler.

◆ simulateRuns() [2/2]

void simulateRuns ( MonteCarloModelDouble  model,
Tally  collector 
)


Implements Sampler.


The documentation for this class was generated from the following file: