C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
blitzplusplus::SlicesData< RANK, V > Class Template Reference

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 >
 

Detailed Description

template<int RANK, typename V>
class blitzplusplus::SlicesData< RANK, V >

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.

Template Parameters
RANKarity of the Hilbert space
Vcompile-time vector holding the retained index positions (cf. Specifying subsystems)

Definition at line 454 of file BlitzArraySliceIterator.h.

Constructor & Destructor Documentation

template<int RANK, typename V>
blitzplusplus::SlicesData< RANK, V >::SlicesData ( const CArray< RANK > &  array)

Constructor from a reference array.

Parameters
arrayreference array showing the structure for which the slicing is envisaged

The documentation for this class was generated from the following file: