SkePU(integratedwithStarPU)  0.8.1
 All Classes Namespaces Files Functions Enumerations Friends Macros Groups Pages
Public Member Functions | List of all members
skepu::DataCollector2D< Tx, Ty > Class Template Reference

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)
 

Detailed Description

template<typename Tx, typename Ty>
class skepu::DataCollector2D< Tx, Ty >

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.

Constructor & Destructor Documentation

template<typename Tx , typename Ty >
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.

Parameters
_dataSetNameName of the dataset.
_axisNameXName of the X axis data, or rather the first data.
_axisNameYName of the Y axis data, or the second data.

Member Function Documentation

template<typename Tx , typename Ty >
void skepu::DataCollector2D< Tx, Ty >::addData ( Tx  x,
Ty  y 
)

Adds a 2D data point to the dataset.

Parameters
xx coordinate.
yy coordinate.
template<typename Tx , typename Ty >
void skepu::DataCollector2D< Tx, Ty >::clear ( )

Clear the entire data set.

template<typename Tx , typename Ty >
void skepu::DataCollector2D< Tx, Ty >::writeDataToFile ( const std::string &  filename = "",
DataExportFormat  format = GNUPLOT 
)

Write the data to a file.

Parameters
filenameFilename of the data file to write to.
formatFormat of the data. Currently only GNUPLOT.

The documentation for this class was generated from the following file: