linbox
Public Member Functions
PlotGraph Class Reference

The graph (2D). More...

#include <benchmark.h>

Public Member Functions

void setData (PlotData &data)
 Sets a new data structure. More...
 
PlotDatarefData (PlotData &data)
 Gets the data. More...
 
void setStyle (PlotStyle &style)
 Sets a new style structure. More...
 
PlotStylerefStyle (PlotStyle &style)
 Gets the style. More...
 
 PlotGraph (PlotData &data, PlotStyle &style)
 Constructor for the PlotGraph class. More...
 
void setOutFilename (const std::string &filename)
 sets the ouput file name. More...
 
std::string getPlotCommand (const std::string &File)
 Gets the plot command line. More...
 

Detailed Description

The graph (2D).

This class joins a PlotStyle and a PlotData to build up a graph. A filename should be provided as well, indicating where the output graph and scripts will be generated.

Warning
the filename will get a random suffix before the extension so as not to overwrite files "par inadvertance".
don't name anything else than a folder "data" in your working directory. You've been warned.
Todo:
make depend on PlotStyle (that owns data)
Todo:
use getUsingSeries in latex/html/csv/xml

Constructor & Destructor Documentation

◆ PlotGraph()

PlotGraph ( PlotData data,
PlotStyle style 
)

Constructor for the PlotGraph class.

Plots a series of data according to a style.

Parameters
datadata to be plot, will be processed by the style
stylesets parameters to gnuplot to achieve a nice plot.

Member Function Documentation

◆ setData()

void setData ( PlotData data)

Sets a new data structure.

Parameters
dataa reference to a PlotData class.

◆ refData()

PlotData & refData ( PlotData data)

Gets the data.

Parameters
[in,out]dataa reference to a PlotData class.

◆ setStyle()

void setStyle ( PlotStyle style)

Sets a new style structure.

Parameters
stylea reference to a PlotStyle class.

◆ refStyle()

PlotStyle & refStyle ( PlotStyle style)

Gets the style.

Parameters
[in,out]stylea reference to a PlotStyle class.

◆ setOutFilename()

void setOutFilename ( const std::string &  filename)

sets the ouput file name.

All output is put in a "data" subfolder.

Warning
Since no file is overwritten, this directory can rapidly get very populated.

◆ getPlotCommand()

std::string getPlotCommand ( const std::string &  File)

Gets the plot command line.

Parameters
Filethe name of/path to the data file (with extension)
Returns
a gnuplot "plot" command stream.

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