rrRoadRunnerData
-
class RoadRunnerData
The RoadRunnerData class is used for simulation output, and provides a wrapper around 2D matrix data.
Public Functions
-
RoadRunnerData(const int &rSize = 0, const int &cSize = 0)
-
RoadRunnerData(const std::vector<std::string> &colNames, const DoubleMatrix &data)
-
RoadRunnerData(const RoadRunner *rr)
-
~RoadRunnerData()
-
void allocate(const size_t &cSize, const size_t &rSize)
-
void allocateWeights()
-
bool hasWeights() const
-
const std::vector<std::string> &getColumnNames() const
-
std::string getColumnName(const int col) const
-
std::string getColumnNamesAsString() const
-
void setColumnNames(const std::vector<std::string> &colNames)
-
std::ptrdiff_t getColumnIndex(const std::string &colName) const
-
void setTimeDataPrecision(const int &prec)
-
void setDataPrecision(const int &prec)
-
void reSize(int rows, int cols)
-
void clear()
-
int rSize() const
-
int cSize() const
-
void setData(const DoubleMatrix &theData)
-
bool loadSimpleFormat(const std::string &fileName)
-
bool writeTo(const std::string &fileName) const
-
bool readFrom(const std::string &fileName)
-
bool check() const
-
double &operator()(const unsigned &row, const unsigned &col)
-
double operator()(const unsigned &row, const unsigned &col) const
-
double getDataElement(int row, int col)
-
void setDataElement(int row, int col, double value)
-
RoadRunnerData &operator=(const RoadRunnerData &rhs)
-
double getWeight(int row, int col) const
-
void setWeight(int row, int col, double val)
-
void setName(const std::string &name)
-
std::string getName() const
-
std::pair<int, int> dimension() const
-
bool append(const RoadRunnerData &data)
-
double getTimeStart() const
-
double getTimeEnd() const
-
const DoubleMatrix &getData() const
-
const DoubleMatrix &getWeights() const
Public Members
-
bool structuredResult
Public Static Functions
-
static void writeOnlyData(std::ostream &ss, const RoadRunnerData &data)
-
static void writeWeights(std::ostream &ss, const RoadRunnerData &data)
Protected Attributes
-
std::vector<std::string> mColumnNames
Container holding column names.
-
DoubleMatrix mTheData
Container holding the actual data.
-
DoubleMatrix mWeights
Container holding the data weights.
-
int mTimePrecision
Integer setting the precision of ‘time’ double numbers when writing to file.
-
int mDataPrecision
Integer setting the precision of ‘data’ double numbers when writing to file.
-
std::string mName
String holding the ‘name’ of the object.
- Todo:
Remove
Friends
- friend RR_DECLSPEC friend std::ostream & operator<< (std::ostream &ss, const RoadRunnerData &data)
- friend RR_DECLSPEC friend std::istream & operator>> (std::istream &ss, RoadRunnerData &data)
-
RoadRunnerData(const int &rSize = 0, const int &cSize = 0)