public class MonteCarlo extends Object
numSimulations
times.Modifier and Type | Field and Description |
---|---|
private int |
numSimulations |
private MonteCarloResults |
resultsConsumer |
private MonteCarloScenario |
simulation |
Constructor and Description |
---|
MonteCarlo(MonteCarloScenario simulation,
int numSimulations)
Create a Monte Carlo object that is capable of running
numSimulation MonteCarloScenarios. |
Modifier and Type | Method and Description |
---|---|
void |
finalize() |
MonteCarloResults |
getResults()
Get a copy of the results from the simulation.
|
void |
run()
Run the Monte Carlo simulations.
|
void |
setResultsConsumer(MonteCarloResults consumer)
Set the consumer object for this Monte Carlo simulation.
|
private final MonteCarloScenario simulation
private MonteCarloResults resultsConsumer
private final int numSimulations
public MonteCarlo(MonteCarloScenario simulation, int numSimulations)
numSimulation
MonteCarloScenarios.simulation
- the simulation or scenario to be run.numSimulations
- the number of times the simulation should be run.public final void run()
public final MonteCarloResults getResults()
public final void setResultsConsumer(MonteCarloResults consumer)
consumer
- the results object to use as a consumer.Copyright © 2015 University of Glasgow. All rights reserved.