Workspace 6.21.5
Public Member Functions | List of all members
ArrayNdSlice Class Referenceabstract

Acts as a slice of an ArrayNd set, without having to copy the data. Is not specific to any data type.

#include <DataAnalysis/DataStructures/arrayndslice.h>

Inheritance diagram for ArrayNdSlice:
[legend]

Public Member Functions

virtual ~ArrayNdSlice ()=default
 
virtual ArrayNdgetAsArrayNd ()=0
 
virtual bool setBaseData (ArrayNd &data, const NamedDimensionRangeList &includedRange, bool ownsData=false)=0
 

Constructor & Destructor Documentation

◆ ~ArrayNdSlice()

virtual ~ArrayNdSlice ( )
virtualdefault

Member Function Documentation

◆ getAsArrayNd()

virtual ArrayNd * getAsArrayNd ( )
pure virtual

Returns the slice safely cast to an ArrayNd type.

Implemented in ArrayNdSliceTyped< T >.

◆ setBaseData()

virtual bool setBaseData ( ArrayNd data,
const NamedDimensionRangeList includedRange,
bool  ownsData = false 
)
pure virtual
Parameters
dataThe N-dimensional dataset which we are slicing.
includedRangeThe dimensions that make up the slice. The lowest index in each dimension will become index 0 in the slice.
ownsDataWhether or not this structure is to take ownership of the supplied data, and therefore whether or not it should be responsible for cleaning it up.
Returns
true if the base data was set successfully. Will return false if the number of dimensions in includedRange does not exactly match the number of dimensions in data, or if the data factory of data does not match the type of this data structure.

Sets the underlying data that we are slicing into. Must be called before any of the other functions on the slice will work correctly.

Implemented in ArrayNdSliceTyped< T >.