Workspace 6.21.5
|
A template implementation of the NDimensionalData interface that stores data in memory. There is no implicit sharing of data between stores. More...
#include <DataAnalysis/DataStructures/arraynddata.h>
Classes | |
class | iterator |
class | iterator_range |
Represents a pair of iterators that bound a range of data (i.e. the begin and end corners of a multi-dimensional cube of data). More... | |
Public Types | |
using | size_type = ArrayNd::size_type |
Public Types inherited from ArrayNd | |
typedef NamedDimensionRange::size_type | size_type |
Public Member Functions | |
ArrayNdData () | |
ArrayNdData (ArrayNdData &&other) | |
ArrayNdData (const ArrayNdData &other) | |
~ArrayNdData () override | |
bool | arrayAccessHint (const NamedDimensionRangeList &range) override |
iterator | begin () |
ArrayNdData * | clone () const override |
iterator | end () |
DataCollection & | getAttributes () |
const DataCollection & | getAttributes () const override |
bool | getData (const NamedDimensionRangeList &range, T *data) const override |
const DataExecution::DataFactory * | getDataFactory () const override |
int | getDimensionIndex (const QString &name) const override |
ArrayNdDimensionLabels | getDimensionLabels (const QString &dimName) const override |
QString | getDimensionName (int index) const override |
size_type | getDimensionSize (const QString &name) const override |
size_type | getDimensionSize (int index) const override |
double | getFillValue () const override |
QVariant | getFillValueAsVariant () const override |
bool | hasFillValue () const override |
bool | isDimensionUnlimited (int index) const override |
int | numDimensions () const override |
ArrayNdData & | operator= (ArrayNdData rhs) |
iterator_range | range (const NamedDimensionRangeList &range) |
bool | setDimensionLabels (const QString &dimName, const ArrayNdDimensionLabels &labels) |
bool | setDimensions (const NamedDimensionRangeList &dimensions) override |
bool | setFillValue (const T &value) override |
void | setHasFillValue (bool b) override |
T | valueAt (const DimensionIndexList &indices) const override |
T | valueAt (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const override |
bool | writeData (const NamedDimensionRangeList &range, const T *const data) override |
Public Member Functions inherited from ArrayNdTyped< T > | |
bool | arrayAccessHint (const NamedDimensionRangeList &range) override=0 |
ArrayNdTyped * | clone () const override=0 |
virtual bool | getData (const NamedDimensionRangeList &range, T *data) const =0 |
double | getFillValue () const override=0 |
QVariant | getFillValueAsVariant () const override=0 |
QVariant | getValue (const DimensionIndexList &dimIndices) const override |
QVariant | getValue (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const override |
bool | hasFillValue () const override=0 |
double | operator() (const DimensionIndexList &dimIndices) const override |
double | operator() (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const override |
ArrayNdTyped & | operator= (const ArrayNdTyped &other)=default |
virtual bool | setFillValue (const T &value)=0 |
void | setHasFillValue (bool b) override=0 |
virtual T | valueAt (const DimensionIndexList &indices) const =0 |
virtual T | valueAt (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const =0 |
virtual bool | writeData (const NamedDimensionRangeList &range, const T *const data)=0 |
Public Member Functions inherited from ArrayNd | |
ArrayNd () | |
~ArrayNd () override | |
virtual bool | arrayAccessHint (const NamedDimensionRangeList &range)=0 |
const_iterator | begin () const |
ArrayNd * | clone () const override=0 |
const_iterator | end () const |
NamedDimensionRangeList | getAllDimensions () const |
virtual const DataCollection & | getAttributes () const =0 |
template<typename T > | |
bool | getData (const NamedDimensionRangeList &range, T *data) const |
virtual const DataExecution::DataFactory * | getDataFactory () const =0 |
NamedDimensionRange | getDimension (const QString &name) const |
virtual int | getDimensionIndex (const QString &name) const =0 |
virtual ArrayNdDimensionLabels | getDimensionLabels (const QString &dimensionName) const =0 |
virtual QString | getDimensionName (int index) const =0 |
virtual size_type | getDimensionSize (const QString &name) const =0 |
virtual size_type | getDimensionSize (int index) const =0 |
virtual double | getFillValue () const =0 |
virtual QVariant | getFillValueAsVariant () const =0 |
template<typename T > | |
ArrayNdTyped< T > * | getTypedInterface () |
template<typename T > | |
const ArrayNdTyped< T > * | getTypedInterface () const |
virtual QVariant | getValue (const DimensionIndexList &dimIndices) const =0 |
virtual QVariant | getValue (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const =0 |
virtual bool | hasFillValue () const =0 |
virtual bool | isDimensionUnlimited (int index) const =0 |
virtual int | numDimensions () const =0 |
virtual double | operator() (const DimensionIndexList &dimIndices) const =0 |
virtual double | operator() (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const =0 |
const_iterator_range | range (const NamedDimensionRangeList &range) const |
virtual bool | setDimensions (const NamedDimensionRangeList &dimensions)=0 |
template<typename T > | |
bool | setFillValue (const T &value) |
virtual void | setHasFillValue (bool b)=0 |
template<typename T > | |
bool | writeData (const NamedDimensionRangeList &range, const T *data) |
Public Member Functions inherited from Clonable | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
Protected Member Functions | |
T & | refValueAt (const DimensionIndexList &indices) const |
T & | refValueAt (size_type dim0, size_type dim1=0, size_type dim2=0, size_type dim3=0, size_type dim4=0) const |
Protected Member Functions inherited from ArrayNd | |
ArrayNd (ArrayNd &&other) | |
ArrayNd (const ArrayNd &other) | |
ArrayNd & | operator= (const ArrayNd &other)=default |
using size_type = ArrayNd::size_type |
ArrayNdData | ( | const ArrayNdData< T > & | other | ) |
ArrayNdData | ( | ArrayNdData< T > && | other | ) |
|
overridedefault |
|
overridevirtual |
range | The range we are expecting to read from when using the getValue or operator() functions. |
The range we are hinting that we're about to access repeatedly through individual indexed reads (i.e. using the operator() function).
Implements ArrayNdTyped< T >.
|
inline |
|
overridevirtual |
Implements ArrayNdTyped< T >.
|
inline |
DataCollection & getAttributes |
|
overridevirtual |
|
overridevirtual |
range | The bounded range from which we are reading data. |
data | The data store into which we will write the data that we are reading from the dataset. |
Gets data from the underlying data structure, copying it into the provided data parameter. The exact dimensions of the read are specified by the range parameter.
Implements ArrayNdTyped< T >.
|
overridevirtual |
|
overridevirtual |
name | The name of the dimension for which we wish to rerieve its index. |
Implements ArrayNd.
|
overridevirtual |
dimensionName | The name of the dimension for which we wish to retrieve its labels. |
Implements ArrayNd.
|
overridevirtual |
index | The index of the dimension for which we wish to retrieve its name. |
Implements ArrayNd.
|
overridevirtual |
name | The name of the dimension for which we wish to retrieve its size, i.e. the number of elements in the specified dimension. |
Implements ArrayNd.
|
overridevirtual |
index | The index of the dimension for which we wish to retrieve its size, i.e. the number of elements in the specified dimension. |
Implements ArrayNd.
|
overridevirtual |
The Fill Value of the dataset is used to indicate an 'empty' cell. Cells that do not contain any valid data, or data outside the known / valid range, will contain the fill value.
Implements ArrayNdTyped< T >.
|
overridevirtual |
The Fill Value of the dataset is used to indicate an 'empty' cell. Cells that do not contain any valid data, or data outside the known / valid range, will contain the fill value.
Implements ArrayNdTyped< T >.
|
overridevirtual |
The Fill Value of the dataset is used to indicate an 'empty' cell. Cells that do not contain any valid data, or data outside the known / valid range, will contain the fill value. This function returns a value indicating whether or not a fill value is being used.
Implements ArrayNdTyped< T >.
|
overridevirtual |
Implements ArrayNd.
|
overridevirtual |
Implements ArrayNd.
ArrayNdData< T > & operator= | ( | ArrayNdData< T > | rhs | ) |
|
inline |
|
protected |
|
protected |
Reference versions of the above code.
bool setDimensionLabels | ( | const QString & | dimName, |
const ArrayNdDimensionLabels & | labels | ||
) |
Sets the labels on a given dimension
dimName | The dimension name |
labels | The labels to assign to the dimension |
|
overridevirtual |
dimensions | The dimensions we are going to use to resize the data store. |
Resizes the dataset so that it possesses the dimensions specified. The dimensions will be stored internally in the order specified (i.e. the index of the dimension in the list of input dimensions will match the index used internally).
Implements ArrayNd.
|
overridevirtual |
value | The fill value that we are setting. |
When the dimensions of a dataset are set (setDimensions), a fill-value is specified which will be used to populate the newly created cells. This function allows the fill-value to be overridden.
Implements ArrayNdTyped< T >.
|
overridevirtual |
b | Whether or not to use a fill value for this dataset. By default, the fill value will be the default constructed type of the underlying stored data. |
The Fill Value of the dataset is used to indicate an 'empty' cell. Cells that do not contain any valid data, or data outside the known / valid range, will contain the fill value. This function allows the caller to indicate that a fill value is in use in the dataset.
Implements ArrayNdTyped< T >.
|
inlineoverridevirtual |
indices | The specific indices of the dimensions we wish to access. By default, the indices in the list are assumed to be in the same order that they are in the dataset (e.g. indices[0] will index into getDimension(0)). |
Retrieve a single value from the datset using syntax similar to array subscript notation. This particular overload allows the caller to retrieve a value from a dataset with any number of dimensions.
Implements ArrayNdTyped< T >.
|
inlineoverridevirtual |
dim0 | The index of the first dimension in the dataset. |
dim1 | The index of the second dimension in the dataset. |
dim2 | The index of the third dimension in the dataset. |
dim3 | The index of the fourth dimension in the dataset. |
dim4 | The index of the fifth dimension in the dataset. |
Retrieve a single value from the datset using syntax similar to array subscript notation. This particular overload allows the caller to retrieve a value from a dataset with 5 dimensions. Dimensions at indexes 5 and above (assuming they exist) will be be retrieved using index 0 for these dimensions.
Implements ArrayNdTyped< T >.
|
overridevirtual |
range | The bounded range to which we are writing the data. These dimensions must be specified in terms of the sliced dimensions, not the dimensions of the underlying base dataset. |
data | The data which we are going to write into the dataset. |
Writes data to the underlying data structure, copying it from the provided data parameter. The exact dimensions of the write are specified by the range parameter.
Implements ArrayNdTyped< T >.