The class for transmitting (Monte Carlo) simulation results between objects. Simulation results may be diverse: this structure should be able to accomodate each of the results, even if they are not all present at the same time. Results include: trajectories, empirical frequencies.
More...
#include <marmoteSimulationResult.h>
|
| SimulationResult (MarmoteSet *state_space, timeType t, bool stats, bool traj, bool trace=false, bool increments=false) |
|
| SimulationResult (std::string format, std::string modelName, bool stats) |
|
| ~SimulationResult () |
|
MarmoteSet * | state_space () const |
| Read accessor to the state space (support set) of the samples.
|
|
simLenType | trajectorySize () const |
| The current size of the trajectory recorded in the sample.
|
|
simLenType | lastDate () const |
| The date of the last record in the simulation.
|
|
stateType | lastState () const |
| The last state of the simulation.
|
|
const std::vector< double > & | CT_dates () |
| Accessor to the dates of the trajectory in continuous time.
|
|
const std::vector< simLenType > & | DT_dates () |
| Accessor to the dates of the trajectory in discrete time.
|
|
const std::vector< cardinalType > & | states () |
| Accessor to the states of the trajectory.
|
|
void | recordDTSample (simLenType date, cardinalType state) |
| record a sample in discrete time and performs tracing and stats as required.
|
|
void | recordCTSample (double date, cardinalType state) |
| record a sample in continuous time and performs tracing and stats as required
|
|
DiscreteDistribution * | Distribution () |
| Computes the empirical distribution of the sample.
|
|
void | setOutput (std::ostream *out) |
| Sets the output stream used for tracing.
|
|
void | setFullState (bool full) |
| Sets the fullstate flag for tracing.
|
|
void | WriteTrajectory (std::ostream *fout, std::string format) |
| Writes the trajectory to a file.
|
|
void | Diagnose (std::ostream *fout) const |
| Write a diagnostic on the state of the object.
|
|
| Object (void) |
|
virtual | ~Object (void) |
|
const std::string & | className (void) const |
|
void | setClassName (const std::string &) |
|
std::string | toString (void) const |
|
std::string | content (void) const |
|
std::string | info (void) const |
|
The class for transmitting (Monte Carlo) simulation results between objects. Simulation results may be diverse: this structure should be able to accomodate each of the results, even if they are not all present at the same time. Results include: trajectories, empirical frequencies.
- Author
- Alain Jean-Marie
◆ SimulationResult() [1/2]
SimulationResult::SimulationResult |
( |
MarmoteSet * | state_space, |
|
|
timeType | t, |
|
|
bool | stats, |
|
|
bool | traj, |
|
|
bool | trace = false, |
|
|
bool | increments = false ) |
Constructor for a simulation result object
- Author
- Alain Jean-Marie
- Parameters
-
state_space | the state space |
t | type of time: CONTINUOUS or DISCRETE |
stats | whether the occupancy distribution is present or not |
traj | whether a trajectory is stored |
trace | whether the recording of samples should be traced |
increments | whether increments should be stored (continuous-time only) |
◆ SimulationResult() [2/2]
SimulationResult::SimulationResult |
( |
std::string | format, |
|
|
std::string | modelName, |
|
|
bool | stats ) |
Constructor for a simulation result object from a file
- Author
- Alain Jean-Marie
- Parameters
-
format | the format of the file: options "PSI" and "PSI-sample" are supported |
modelName | the name of the model |
stats | whether to compute the occupancy distribution or not |
◆ ~SimulationResult()
SimulationResult::~SimulationResult |
( |
| ) |
|
◆ CT_dates()
const std::vector< double > & SimulationResult::CT_dates |
( |
| ) |
|
|
inline |
Accessor to the dates of the trajectory in continuous time.
- Returns
- the size
◆ Diagnose()
void SimulationResult::Diagnose |
( |
std::ostream * | fout | ) |
const |
Write a diagnostic on the state of the object.
- Parameters
-
fout | the stream on which the diagnostic is written |
◆ Distribution()
Computes the empirical distribution of the sample.
- Returns
- the empirical distribution of the sample
◆ DT_dates()
const std::vector< simLenType > & SimulationResult::DT_dates |
( |
| ) |
|
|
inline |
Accessor to the dates of the trajectory in discrete time.
- Returns
- the size
◆ lastDate()
simLenType SimulationResult::lastDate |
( |
| ) |
const |
The date of the last record in the simulation.
- Returns
◆ lastState()
stateType SimulationResult::lastState |
( |
| ) |
const |
The last state of the simulation.
- Returns
◆ recordCTSample()
void SimulationResult::recordCTSample |
( |
double | date, |
|
|
cardinalType | state ) |
record a sample in continuous time and performs tracing and stats as required
- Parameters
-
date | the time of the sample |
state | the state of the sample |
◆ recordDTSample()
void SimulationResult::recordDTSample |
( |
simLenType | date, |
|
|
cardinalType | state ) |
record a sample in discrete time and performs tracing and stats as required.
- Parameters
-
date | the time of the sample |
state | the state of the sample |
◆ setFullState()
void SimulationResult::setFullState |
( |
bool | full | ) |
|
|
inline |
Sets the fullstate flag for tracing.
- Parameters
-
◆ setOutput()
void SimulationResult::setOutput |
( |
std::ostream * | out | ) |
|
|
inline |
Sets the output stream used for tracing.
- Parameters
-
◆ state_space()
MarmoteSet * SimulationResult::state_space |
( |
| ) |
const |
|
inline |
Read accessor to the state space (support set) of the samples.
- Author
- Alain Jean-Marie
- Returns
- a pointer to the state space
◆ states()
const std::vector< cardinalType > & SimulationResult::states |
( |
| ) |
|
|
inline |
Accessor to the states of the trajectory.
- Returns
- the size
◆ toString_impl()
std::string SimulationResult::toString_impl |
( |
void | | ) |
const |
|
overrideprotectedvirtual |
◆ trajectorySize()
simLenType SimulationResult::trajectorySize |
( |
| ) |
const |
|
inline |
The current size of the trajectory recorded in the sample.
- Returns
◆ WriteTrajectory()
void SimulationResult::WriteTrajectory |
( |
std::ostream * | fout, |
|
|
std::string | format ) |
Writes the trajectory to a file.
- Parameters
-
fout | pointer to the file descriptor to which the trajectory is written |
format | the format used for writing. Supported formats are "standard", "Ers" and "" which are all equivalent |
The documentation for this class was generated from the following files: