GiNaC 1.8.7
|
basic_multi_iterator is a base class. More...
#include <utils_multi_iterator.h>
Public Member Functions | |
basic_multi_iterator (void) | |
Default constructor. More... | |
basic_multi_iterator (T B, T N, size_t k) | |
Construct a multi_iterator with upper limit N, lower limit B and size k . More... | |
basic_multi_iterator (T B, T N, const std::vector< T > &vv) | |
Construct from a vector. More... | |
virtual | ~basic_multi_iterator () |
Destructor. More... | |
size_t | size (void) const |
Returns the size of a multi_iterator. More... | |
bool | overflow (void) const |
Return the overflow flag. More... | |
const std::vector< T > & | get_vector (void) const |
Returns a reference to the vector v. More... | |
T | operator[] (size_t i) const |
Subscription via []. More... | |
T & | operator[] (size_t i) |
Subscription via []. More... | |
T | operator() (size_t i) const |
Subscription via () More... | |
T & | operator() (size_t i) |
Subscription via () More... | |
virtual basic_multi_iterator< T > & | init (void) |
Initialize the multi-index to. More... | |
virtual basic_multi_iterator< T > & | operator++ (int) |
No effect for basic_multi_iterator. More... | |
Protected Attributes | |
T | N |
T | B |
std::vector< T > | v |
bool | flag_overflow |
Friends | |
template<class TT > | |
std::ostream & | operator<< (std::ostream &os, const basic_multi_iterator< TT > &v) |
basic_multi_iterator is a base class.
The base class itself does not do anything useful. A typical use of a class derived from basic_multi_iterator is
multi_iterator_ordered<int> k(0,4,2);
for( k.init(); !k.overflow(); k++) { std::cout << k << std::endl; }
which prints out
multi_iterator_ordered(0,1) multi_iterator_ordered(0,2) multi_iterator_ordered(0,3) multi_iterator_ordered(1,2) multi_iterator_ordered(1,3) multi_iterator_ordered(2,3)
Individual components of k can be accessed with k[i] or k(i).
All classes derived from basic_multi_iterator follow the same syntax.
Definition at line 97 of file utils_multi_iterator.h.
|
inline |
Default constructor.
Definition at line 405 of file utils_multi_iterator.h.
|
inlineexplicit |
Construct a multi_iterator with upper limit N, lower limit B and size k .
Definition at line 413 of file utils_multi_iterator.h.
|
inlineexplicit |
Construct from a vector.
Definition at line 421 of file utils_multi_iterator.h.
|
inlinevirtual |
Destructor.
Definition at line 429 of file utils_multi_iterator.h.
|
inline |
Returns the size of a multi_iterator.
Definition at line 439 of file utils_multi_iterator.h.
Referenced by GiNaC::operator<<().
|
inline |
Return the overflow flag.
Definition at line 467 of file utils_multi_iterator.h.
|
inline |
Returns a reference to the vector v.
Definition at line 477 of file utils_multi_iterator.h.
|
inline |
Subscription via [].
Definition at line 489 of file utils_multi_iterator.h.
|
inline |
Subscription via [].
Definition at line 499 of file utils_multi_iterator.h.
|
inline |
Subscription via ()
Definition at line 509 of file utils_multi_iterator.h.
|
inline |
Subscription via ()
Definition at line 519 of file utils_multi_iterator.h.
|
inlinevirtual |
Initialize the multi-index to.
Reimplemented in GiNaC::multi_iterator_ordered< T >, GiNaC::multi_iterator_ordered_eq< T >, GiNaC::multi_iterator_ordered_eq_indv< T >, GiNaC::multi_iterator_counter< T >, GiNaC::multi_iterator_counter_indv< T >, GiNaC::multi_iterator_permutation< T >, GiNaC::multi_iterator_shuffle< T >, and GiNaC::multi_iterator_shuffle_prime< T >.
Definition at line 452 of file utils_multi_iterator.h.
|
inlinevirtual |
No effect for basic_multi_iterator.
Reimplemented in GiNaC::multi_iterator_ordered< T >, GiNaC::multi_iterator_ordered_eq< T >, GiNaC::multi_iterator_ordered_eq_indv< T >, GiNaC::multi_iterator_counter< T >, GiNaC::multi_iterator_counter_indv< T >, GiNaC::multi_iterator_permutation< T >, and GiNaC::multi_iterator_shuffle< T >.
Definition at line 530 of file utils_multi_iterator.h.
|
friend |
|
protected |
Definition at line 134 of file utils_multi_iterator.h.
|
protected |
Definition at line 135 of file utils_multi_iterator.h.
Referenced by GiNaC::multi_iterator_shuffle< T >::multi_iterator_shuffle(), and GiNaC::operator<<().
|
protected |
Definition at line 136 of file utils_multi_iterator.h.
Referenced by GiNaC::multi_iterator_shuffle< T >::multi_iterator_shuffle().
|
protected |
Definition at line 137 of file utils_multi_iterator.h.