This is the class used to get values for the variables used in the model simulation. These values are either read from an InitialInputFile, or received from the network if the simulation is part of a parallel optimisation, using paramin.
More...
#include <stochasticdata.h>
This is the class used to get values for the variables used in the model simulation. These values are either read from an InitialInputFile, or received from the network if the simulation is part of a parallel optimisation, using paramin.
◆ StochasticData() [1/3]
StochasticData::StochasticData |
( |
| ) |
|
◆ StochasticData() [2/3]
StochasticData::StochasticData |
( |
const char *const |
filename, |
|
|
int |
p |
|
) |
| |
This is the StochasticData constructor specifying a file to read the data from.
- Parameters
-
filename | is the name of the file to read the data from |
p | is the number of the node |
◆ StochasticData() [3/3]
StochasticData::StochasticData |
( |
const char *const |
filename | ) |
|
This is the StochasticData constructor specifying a file to read the data from.
- Parameters
-
filename | is the name of the file to read the data from |
◆ ~StochasticData()
StochasticData::~StochasticData |
( |
| ) |
|
|
virtual |
◆ getLowerBound()
double StochasticData::getLowerBound |
( |
int |
i | ) |
const |
|
inline |
This function will return the lower bound for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- lower bound for the switch
◆ getOptFlag()
int StochasticData::getOptFlag |
( |
int |
i | ) |
const |
This function will return the optimising flag for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- optimise flag for the switch
◆ getSwitch()
Parameter StochasticData::getSwitch |
( |
int |
i | ) |
const |
|
inline |
This function will return the paramter name for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- parameter name for the switch
◆ getUpperBound()
double StochasticData::getUpperBound |
( |
int |
i | ) |
const |
|
inline |
This function will return the upper bound for a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- upper bound for the switch
◆ getValue()
double StochasticData::getValue |
( |
int |
i | ) |
const |
|
inline |
This function will return the value of a switch in the input file.
- Parameters
-
i | is the index for the switch |
- Returns
- value of the switch
◆ isDataLeft()
int StochasticData::isDataLeft |
( |
| ) |
|
|
inline |
This function will check to see if there is more data to read in the input file.
- Returns
- 1 if there is more data to read from the input file, 0 otherwise
◆ isOptGiven()
int StochasticData::isOptGiven |
( |
| ) |
const |
This function will check to see if optimising flags have been specified in the input file.
- Returns
- 1 if the optimising flags have been specified, 0 otherwise
◆ numSwitches()
int StochasticData::numSwitches |
( |
| ) |
const |
|
inline |
This function will return the number of switches read from the input file.
- Returns
- number of switches
◆ numVariables()
int StochasticData::numVariables |
( |
| ) |
const |
|
inline |
This function will return the number of variables read from the input file.
- Returns
- number of variables
◆ readNextLine()
void StochasticData::readNextLine |
( |
| ) |
|
This function will read the next line of data from the input file.
- Note
- This function is only called if the input file has data using the 'repeated values' format
◆ lowerbound
This is the DoubleVector used to store the lower bounds of the parameters read from file.
◆ netrun
int StochasticData::netrun |
|
protected |
This is the flag to denote whether gadget is running in network mode or not.
◆ optimise
This is the IntVector used to store the flag to denote whether to optimise the parameters read from file.
◆ readInfo
This is the InitialInputFile used to read from file the initial values and bounds of the parameters for the current model.
◆ switches
◆ upperbound
This is the DoubleVector used to store the upper bounds of the parameters read from file.
◆ values
This is the DoubleVector used to store the values of the parameters read from file.
The documentation for this class was generated from the following files: