ThePEG
2.2.1
|
An DataPointSet represents a binned histogram axis. More...
#include <DataPointSet.h>
Public Member Functions | |
DataPointSet (int D) | |
Standard constructor takes the dimension, D, of the data points as argument. | |
virtual | ~DataPointSet () |
Destructor. | |
IAnnotation & | annotation () |
Not implemented in LWH. More... | |
const IAnnotation & | annotation () const |
Not implemented in LWH. More... | |
std::string | title () const |
Get the data set's title. More... | |
std::string | name () const |
Get the data set's title. More... | |
bool | setTitle (const std::string &title) |
Set the data set's title. More... | |
int | dimension () const |
Get the dimension of the IDataPoints that can be stored in the set. More... | |
void | clear () |
Remove all the IDataPoints in the set. More... | |
int | size () const |
Get the current size of the IDataPointSet, i.e. More... | |
IDataPoint * | point (int index) |
Get the IDataPoint at a give index in the set. More... | |
bool | setCoordinate (int coord, const std::vector< double > &val, const std::vector< double > &err) |
Set the values and errors of a given coordinate all at once. More... | |
bool | setCoordinate (int coord, const std::vector< double > &val, const std::vector< double > &errp, const std::vector< double > &errm) |
Set the values and errors of a given coordinate all at once. More... | |
const IDataPoint * | point (int index) const |
Return the data point at the given index. More... | |
IDataPoint * | addPoint () |
Add a new empty IDataPoint at the end of the set. More... | |
bool | addPoint (const IDataPoint &point) |
Add a copy of an IDataPoint at the end of the set. More... | |
bool | removePoint (int index) |
Remove the IDataPoint at a given index. More... | |
double | lowerExtent (int coord) const |
Get the lower value for a give axis. More... | |
double | upperExtent (int coord) const |
Get the upper value for a give axis. More... | |
bool | scale (double scale) |
Scales the values and the errors of all the measurements of each point by a given factor. More... | |
bool | scaleValues (double scale) |
Scales the values of all the measurements of each point by a given factor. More... | |
bool | scaleErrors (double scale) |
Scales the errors of all the measurements of each point by a given factor. More... | |
void * | cast (const std::string &) const |
Not implemented in LWH. More... | |
bool | writeXML (std::ostream &os, std::string path, std::string name) |
Write out the data set in the AIDA xml format. | |
bool | writeFLAT (std::ostream &os, std::string path, std::string name) |
Write out the data set in a flat text file suitable for eg. More... | |
Public Member Functions inherited from LWH::ManagedObject | |
virtual | ~ManagedObject () |
Destructor. | |
Private Attributes | |
std::string | theTitle |
The title. | |
std::vector< DataPoint > | dset |
The included data points. | |
unsigned int | dim |
The dimension of the points in this set. | |
An DataPointSet represents a binned histogram axis.
A 1D Histogram would have one DataPointSet representing the X axis, while a 2D Histogram would have two axes representing the X and Y DataPointSet.
Definition at line 33 of file DataPointSet.h.
|
inline |
Add a new empty IDataPoint at the end of the set.
Definition at line 185 of file DataPointSet.h.
|
inline |
Add a copy of an IDataPoint at the end of the set.
point | The IDataPoint to be added. |
Definition at line 196 of file DataPointSet.h.
|
inline |
|
inline |
|
inline |
|
inline |
Remove all the IDataPoints in the set.
After this the IDataPointSet is as just created.
Definition at line 101 of file DataPointSet.h.
|
inline |
Get the dimension of the IDataPoints that can be stored in the set.
Definition at line 93 of file DataPointSet.h.
|
inline |
Get the lower value for a give axis.
coord | The coordinate of the axis. |
Definition at line 220 of file DataPointSet.h.
|
inline |
Get the data set's title.
Definition at line 74 of file DataPointSet.h.
|
inline |
Get the IDataPoint at a give index in the set.
index | The IDataPoint index. |
Definition at line 119 of file DataPointSet.h.
|
inline |
Return the data point at the given index.
Definition at line 176 of file DataPointSet.h.
|
inline |
Remove the IDataPoint at a given index.
index | The index of the IDataPoint to be removed. |
Definition at line 207 of file DataPointSet.h.
|
inline |
Scales the values and the errors of all the measurements of each point by a given factor.
scale | The scale factor. |
Definition at line 253 of file DataPointSet.h.
|
inline |
Scales the errors of all the measurements of each point by a given factor.
scale | The scale factor. |
Definition at line 285 of file DataPointSet.h.
|
inline |
Scales the values of all the measurements of each point by a given factor.
scale | The scale factor. |
Definition at line 270 of file DataPointSet.h.
|
inline |
Set the values and errors of a given coordinate all at once.
If this method is called on an empty IDataPointSet, a number of points equal to the size of the arrays provided is created; if the IDataPointSet is not empty the dimension of the array must match with the size of the IDataPointSet.
coord | The coordinate's index |
val | The array of the values for the given coordinate |
err | The array with the symmetric errors. |
Definition at line 136 of file DataPointSet.h.
|
inline |
Set the values and errors of a given coordinate all at once.
If this method is called on an empty IDataPointSet, a number of points equal to the size of the arrays provided is created; if the IDataPointSet is not empty the dimension of the array must match with the size of the IDataPointSet.
coord | The coordinate's index |
val | The array of the values for the given coordinate |
errp | The array with the plus errors. |
errm | The array with the minus errors. |
Definition at line 157 of file DataPointSet.h.
|
inline |
Set the data set's title.
title | The title. |
Definition at line 83 of file DataPointSet.h.
Referenced by LWH::DataPointSetFactory::create().
|
inline |
Get the current size of the IDataPointSet, i.e.
the number of IDataPoints contained in the set.
Definition at line 110 of file DataPointSet.h.
|
inline |
Get the data set's title.
Definition at line 66 of file DataPointSet.h.
|
inline |
Get the upper value for a give axis.
coord | The coordinate of the axis. |
Definition at line 237 of file DataPointSet.h.
|
inlinevirtual |
Write out the data set in a flat text file suitable for eg.
gnuplot to read. The coloums are layed out as 'x1 x2 ... xn dx1+ dx2+ ... dxn+ dx1- dx2- ... dxn-'.
Implements LWH::ManagedObject.
Definition at line 334 of file DataPointSet.h.