Workspace 6.21.5
|
Template subclass of DataSeries for things that act like std::vector. More...
#include <DataAnalysis/DataStructures/dataseries.h>
Public Member Functions | |
StandardDataSeries () | |
StandardDataSeries (const Evaluator &evaluator) | |
StandardDataSeries (const StandardDataSeries &series) | |
StandardDataSeries (T *array, bool ownsData) | |
~StandardDataSeries () override | |
StandardDataSeries * | clone () const override |
void | destroy () override |
bool | empty () const override |
double | operator[] (int i) const override |
void | setData (T *d, bool ownsData) |
unsigned | size () const override |
Public Member Functions inherited from DataSeries | |
~DataSeries () override=default | |
double | back () const |
const_iterator | begin () const |
DataSeries * | clone () const override=0 |
virtual void | destroy ()=0 |
virtual bool | empty () const =0 |
const_iterator | end () const |
double | front () const |
bool | isInfinite () const |
operator QVector< double > () const | |
virtual double | operator[] (int i) const =0 |
virtual unsigned | size () const =0 |
Public Member Functions inherited from Clonable | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
T | A std::vector-like type (QVector is also similar). |
Evaluator | Policy for how to get a double from a particular element of the array. The default will rely on the element type having an automatic conversion to double . |
This class assumes that the template type T is similar to std::vector
or QVector
. It implements all the required functions of a DataSeries using only some common functions from those two types. The main benefit of using this class is that if the type T acts like a std::vector, then making it available as a DataSeries is as simple as instantiating this template with that type.
For some cases, the array might hold data types that do not have an automatic conversion to double
. In such cases, the Evaluator can be set to a custom type that performs the conversion, or if the conversion makes sense in all cases, the DataSeriesEvaluator template class can be given an explicit specialization for that type.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverride |
|
inlineoverridevirtual |
Note that this implementation of clone should not clone the underlying data of the series. Rather, just the interface to it should be cloned. This is important, because workspaces will frequently pass around clones of DataSeries objects like handles to the underlying data which could be expensive to copy.
Implements DataSeries.
|
inlineoverridevirtual |
Implements DataSeries.
|
inlineoverridevirtual |
Implements DataSeries.
|
inlineoverridevirtual |
Implements DataSeries.
|
inline |
|
inlineoverridevirtual |
Implements DataSeries.