The raw data to plot.
More...
#include <benchmark.h>
Public Member Functions |
| PlotData (index_t nb_pts, index_t nb_srs=1) |
| Inits a plot with series of data.
|
| ~PlotData () |
| destructor.
|
| PlotData (const PlotData< NAM > &PD) |
| copy constructor.
|
index_t | getSeriesDim () |
| get the number of series.
|
index_t | getPointsDim () |
| get the common number of points in each serie.
|
void | setSerieName (index_t i, std::string nom) |
| Sets the name of a serie.
|
void | setAbsciName (index_t j, NAM nom) |
| Sets the name of a point.
|
std::string | getSerieName (index_t i) |
| gets the name of a serie.
|
NAM | getAbsciName (index_t j) |
| gets the name of a point.
|
std::vector< std::string > | getSerieNames () |
| gets all the names in the series.
|
std::vector< NAM > | getAbsciNames () |
| gets all the names in the points.
|
void | resizeSeries (index_t &n) |
| modifies the number of series.
|
void | resizePoints (index_t &n) |
| modifies the number of points.
|
void | setEntry (index_t i, index_t j, double val) |
| sets a new entry.
|
double | getEntry (index_t i, index_t j) |
| gets a value for an entry.
|
std::vector< std::vector
< float > > & | getTable () |
| gets a reference to the array of data.
|
Detailed Description
template<class NAM>
class LinBox::PlotData< NAM >
The raw data to plot.
Represents the series of points and the labels for the points (X) axis and the series (Y) axis. The internal representation is a vector of vector, each series of point being a vector of double.
- Template Parameters
-
NAM | the X axis is parametered by NAM (string, int, double...) |
- Todo:
- write members that permute, add, scale,... data.
Constructor & Destructor Documentation
PlotData |
( |
index_t |
nb_pts, |
|
|
index_t |
nb_srs = 1 |
|
) |
| |
|
inline |
Inits a plot with series of data.
- Parameters
-
nb_pts | number of points in each serie. |
nb_srs | number of series of points. Default is 1. |
copy constructor.
- Parameters
-
Member Function Documentation
get the number of series.
- Returns
- number of series.
get the common number of points in each serie.
- Returns
- number of points.
void setSerieName |
( |
index_t |
i, |
|
|
std::string |
nom |
|
) |
| |
|
inline |
Sets the name of a serie.
- Parameters
-
i | index of the serie |
nom | name of the serie |
void setAbsciName |
( |
index_t |
j, |
|
|
NAM |
nom |
|
) |
| |
|
inline |
Sets the name of a point.
- Parameters
-
j | index for the the point |
nom | name of the point |
std::string getSerieName |
( |
index_t |
i | ) |
|
|
inline |
gets the name of a serie.
Defaults to "serie.i"
- Parameters
-
- Returns
- its name.
NAM getAbsciName |
( |
index_t |
j | ) |
|
|
inline |
gets the name of a point.
- Parameters
-
- Returns
- its name.
- Warning
- no default.
setAbsciName
has to be used beforehands.
std::vector<std::string > getSerieNames |
( |
| ) |
|
|
inline |
gets all the names in the series.
- Returns
- a vector of names.
std::vector<NAM > getAbsciNames |
( |
| ) |
|
|
inline |
gets all the names in the points.
- Returns
- a vector of names.
void resizeSeries |
( |
index_t & |
n | ) |
|
|
inline |
modifies the number of series.
- Parameters
-
n | the new number of series. Some data will be lost if n is smaller than the current size. |
void resizePoints |
( |
index_t & |
n | ) |
|
|
inline |
modifies the number of points.
- Parameters
-
n | the new number of points in every series. Some data will be lost if n is smaller than the current size. |
void setEntry |
( |
index_t |
i, |
|
|
index_t |
j, |
|
|
double |
val |
|
) |
| |
|
inline |
sets a new entry.
- Parameters
-
i | index of the serie |
j | index of the point |
val | value to be inserted. |
double getEntry |
( |
index_t |
i, |
|
|
index_t |
j |
|
) |
| |
|
inline |
gets a value for an entry.
- Parameters
-
i | index of the serie |
j | index of the point |
- Returns
- val value of point j in serie j.
std::vector<std::vector< float > >& getTable |
( |
| ) |
|
|
inline |
gets a reference to the array of data.
- Returns
- a reference to the member
tableau
representing the data.
The documentation for this class was generated from the following file: