Contains data for pre-calculated slices for basi_fast::Iterator. More...
#include <BlitzArraySliceIterator.h>
Public Types | |
typedef std::list< ptrdiff_t > | Impl |
Data structure for the sequence of slices. | |
Public Member Functions | |
SlicesData (const CArray< RANK > &array) | |
Constructor from a reference array. More... | |
Friends | |
class | basi_fast::Iterator< RANK, V, true > |
class | basi_fast::Iterator< RANK, V, false > |
Contains data for pre-calculated slices for basi_fast::Iterator.
This is most useful in situations where the same structure of slices is needed for several arrays of the same structure or several times for the same array. Then, the data necessary for slicing calculated once, can be used for the different arrays.
Another positive is the easy implementation of basi_fast::Iterator, which basically only needs to iterate over the data of the different slices. Depending on the data structure SlicesData::Impl, basi_fast::Iterator can be of different categories. (E.g. bidirectional iterator for a list, but random-access iterator for a vector.)
The drawback is less convenient usage than that of basi::Iterator, since here a separated instance of SlicesData must be stored.
RANK | arity of the Hilbert space |
V | compile-time vector holding the retained index positions (cf. Specifying subsystems) |
Definition at line 454 of file BlitzArraySliceIterator.h.
blitzplusplus::SlicesData< RANK, V >::SlicesData | ( | const CArray< RANK > & | array | ) |
Constructor from a reference array.
array | reference array showing the structure for which the slicing is envisaged |