BlitzArraySliceIterator. More...
#include <BlitzArraySliceIterator.h>
Public Types | |
typedef boost::mpl::if_c< RANK==1, details::BaseTrivial< V, IS_CONST >, typename boost::mpl::if_c< RANK==Size< V >::value, details::BaseSpecial< V, IS_CONST >, details::Base< RANK, V, IS_CONST > >::type >::type | Base |
typedef Base::CcCA | CcCA |
ttd::ConditionalConstCArray | |
typedef boost::iterator_range< Iterator > | Range |
Boost.Range-compliant range. | |
Public Member Functions | |
Iterator & | operator++ () |
For the ForwardIterator concept. | |
template<bool IS_END> | |
Iterator (CcCA &array, boost::mpl::bool_< IS_END > isEnd) | |
Can be initialized either to the beginning or the end of the sequence of dummy-index combinations. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename V , typename A > | |
const Iterator< Rank< A >::value, V, false > | begin (A &array) |
Iterator to the beginning of the (non-const) sequence. More... | |
template<typename V , typename A > | |
const Iterator< Rank< A >::value, V, false > | end (A &array) |
” for the end More... | |
template<typename V , typename A > | |
const Iterator< Rank< A >::value, V, true > | begin (const A &array) |
Iterator to the beginning of the (const) sequence. More... | |
template<typename V , typename A > | |
const Iterator< Rank< A >::value, V, true > | end (const A &array) |
“ for the end More... | |
template<typename V , typename A > | |
const boost::iterator_range< Iterator< Rank< A >::value, V, false > > | fullRange (A &array) |
Boost.Range-compliant full range of slice iterators More... | |
template<typename V , typename A > | |
const boost::iterator_range< Iterator< Rank< A >::value, V, true > > | fullRange (const A &array) |
” const version More... | |
BlitzArraySliceIterator.
RANK | positive integer standing for the number of elementary Hilbert spaces |
V | compile-time vector holding the retained index positions like here. (Cf. Specifying subsystems) |
IS_CONST | governs the constness of the class |
To understand the template parameters, cf. also The multi-array concept.
Model of ForwardIterator. Can be both const and non-const iterator depending on the last template argument.
This iterator is implemented in terms of a cpputils::MultiIndexIterator, and hence it can be initialized to either the beginning or the end of the “sequence”.
This class is at the absolute heart of the framework as it is indispensable to implement
This said, it is never really used directly in the framework, but rather through the maker functions blitzplusplus::basi::begin, blitzplusplus::basi::end, and blitzplusplus::basi::fullRange in standard or Boost.Range algorithms.
Quite generally, by iterating through all the combinations of indices not belonging to the given subsystem (dummy indices) and when dereferenced returning the corresponding slice, it can be used to implement the action of operators in extended (and/or permutated) Hilbert spaces.
Sticking to the example here, assume that the function
~~~
for_each
algorithm of Boost.Range.For further basic examples of usage cf. utils/testsuite/BlitzArraySliceIterator.cc
& utils/testsuite/BlitzArraySliceIteratorTMP.cc
.
Definition at line 297 of file BlitzArraySliceIterator.h.
|
inline |
Can be initialized either to the beginning or the end of the sequence of dummy-index combinations.
IS_END | governs the end-ness |
Definition at line 316 of file BlitzArraySliceIterator.h.
|
related |
” for the end
|
related |
“ for the end
|
related |
Boost.Range-compliant full range of slice iterators
It corresponds to all the possible combinations of dummy indices ( …) here.
V | the retained index positions |
A | array type taken itself as a parameter to ease template-parameter inference |
|
related |
” const version