Workspace 6.21.5
Public Member Functions | List of all members
SequenceDataSeries Class Reference

An infinite data series whose value is the same as the index. More...

#include <DataAnalysis/DataStructures/dataseries.h>

Inheritance diagram for SequenceDataSeries:
[legend]

Public Member Functions

SequenceDataSeriesclone () const override
 
void destroy () override
 
bool empty () const override
 
double operator[] (int i) const override
 
unsigned size () const override
 
- Public Member Functions inherited from DataSeries
 ~DataSeries () override=default
 
double back () const
 
const_iterator begin () const
 
DataSeriesclone () 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 Clonableclone () const =0
 

Detailed Description

This class represents an infinite series whose sole purpose is to return the index as its value in operator[](int). See the details for DataSeries for more information on this arrangement.

SequenceDataSeries objects are generally used as the X axis source for some other data series being plotted on the Y axis. This allows the values of the Y sequence to be plotted on a regularly spaced interval but where the actual association with an X value is not otherwise needed.

Member Function Documentation

◆ clone()

SequenceDataSeries * clone ( ) const
overridevirtual
Returns
A clone of this object.
Note
Subclasses would normally return their own type rather than the Clonable type. The C++ language rules allow a more derived type to be returned from a virtual function and the compiler will still treat it as a valid override.

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.

◆ destroy()

void destroy ( )
overridevirtual

Implements DataSeries.

◆ empty()

bool empty ( ) const
inlineoverridevirtual

Implements DataSeries.

◆ operator[]()

double operator[] ( int  i) const
inlineoverridevirtual

Implements DataSeries.

◆ size()

unsigned size ( ) const
inlineoverridevirtual

Implements DataSeries.