A class that can be used to collect 2D data. More...
#include <data_collector.h>
Public Member Functions | |
| DataCollector2D (const std::string &_dataSetName, const std::string &_axisNameX, const std::string &_axisNameY) | |
| void | addData (Tx x, Ty y) |
| void | clear () |
| void | writeDataToFile (const std::string &filename="", DataExportFormat format=GNUPLOT) |
| void | appendDataToFile (const std::string &filename, bool firstTime, DataExportFormat format=GNUPLOT) |
A class that can be used to collect 2D data.
This class is used to simplify the collection of two dimensional data. It stores the data internally in a multiset of pairs. It can then be outputted in various formats. In the current version it only supports outputting to a file readable by GnuPlot.
| skepu::DataCollector2D< Tx, Ty >::DataCollector2D | ( | const std::string & | _dataSetName, |
| const std::string & | _axisNameX, | ||
| const std::string & | _axisNameY | ||
| ) |
The constructor sets some names for the current dataset.
| _dataSetName | Name of the dataset. |
| _axisNameX | Name of the X axis data, or rather the first data. |
| _axisNameY | Name of the Y axis data, or the second data. |
| void skepu::DataCollector2D< Tx, Ty >::addData | ( | Tx | x, |
| Ty | y | ||
| ) |
Adds a 2D data point to the dataset.
| x | x coordinate. |
| y | y coordinate. |
| void skepu::DataCollector2D< Tx, Ty >::appendDataToFile | ( | const std::string & | filename, |
| bool | firstTime, | ||
| DataExportFormat | format = GNUPLOT |
||
| ) |
Append the data to a file.
| filename | Filename of the data file to appended to. |
| format | Format of the data. Currently only GNUPLOT. |
| void skepu::DataCollector2D< Tx, Ty >::clear | ( | ) |
Clear the entire data set.
| void skepu::DataCollector2D< Tx, Ty >::writeDataToFile | ( | const std::string & | filename = "", |
| DataExportFormat | format = GNUPLOT |
||
| ) |
Write the data to a file.
| filename | Filename of the data file to write to. |
| format | Format of the data. Currently only GNUPLOT. |
1.8.5