Regina 7.3 Calculation Engine
|
The iterator type for this group. More...
#include <maths/permgroup.h>
Public Types | |
using | value_type = Perm< n > |
Indicates what type the iterator points to. More... | |
using | iterator_category = std::input_iterator_tag |
Declares this to be an input iterator type. More... | |
using | difference_type = typename Perm< n >::Index |
The type obtained by subtracting iterators. More... | |
using | pointer = const value_type * |
A pointer to value_type. More... | |
using | reference = Perm< n > |
The type returned by the dereference operator, which for this iterator type is by value. More... | |
Public Member Functions | |
iterator () | |
Creates a new uninitialised iterator. More... | |
iterator (const iterator &)=default | |
Creates a copy of the given iterator. More... | |
iterator & | operator= (const iterator &)=default |
Makes this a copy of the given iterator. More... | |
bool | operator== (const iterator &rhs) const |
Compares this with the given iterator for equality. More... | |
bool | operator!= (const iterator &rhs) const |
Compares this with the given iterator for inequality. More... | |
iterator & | operator++ () |
The preincrement operator. More... | |
iterator | operator++ (int) |
The postincrement operator. More... | |
Perm< n > | __next__ () |
Returns the current permutation and increments this iterator. More... | |
Perm< n > | operator* () const |
Returns the permutation that this iterator is currently pointing to. More... | |
operator bool () const | |
Identifies whether this iterator is dereferenceable. More... | |
Friends | |
class | PermGroup< n, cached > |
The iterator type for this group.
Unlike most iterator types, the dereference operator for this iterator type returns by value (not by reference). This is because the individual permutations in a group are generated (not stored), based upon an internal group representation that is typically much smaller than the group itself.
Both iterator and const_iterator are the same type, since a PermGroup only offers read-only access to its group members.
using regina::PermGroup< n, cached >::iterator::difference_type = typename Perm<n>::Index |
The type obtained by subtracting iterators.
using regina::PermGroup< n, cached >::iterator::iterator_category = std::input_iterator_tag |
Declares this to be an input iterator type.
using regina::PermGroup< n, cached >::iterator::pointer = const value_type* |
A pointer to value_type.
using regina::PermGroup< n, cached >::iterator::reference = Perm<n> |
The type returned by the dereference operator, which for this iterator type is by value.
See the iterator class notes for details.
using regina::PermGroup< n, cached >::iterator::value_type = Perm<n> |
Indicates what type the iterator points to.
|
inline |
Creates a new uninitialised iterator.
g.__iter__()
).
|
default |
Creates a copy of the given iterator.
g.__iter__()
). Perm< n > regina::PermGroup< n, cached >::iterator::__next__ | ( | ) |
Returns the current permutation and increments this iterator.
StopIteration | The iterator is already past-the-end when this function is called. |
|
inline |
Identifies whether this iterator is dereferenceable.
true
if and only if this is dereferenceable (i.e., not past-the-end).
|
inline |
Compares this with the given iterator for inequality.
To be considered equal, two iterators must be pointing to the same permutation within the same group. (The second condition means that the underlying PermGroup pointers must be the same - it is not enough to have two distinct PermGorup objects with identical contents.)
Two past-the-end iterators will always be considered equal.
rhs | the iterator to compare this with. |
false
if the iterators point to the same permutation, or true
if they do not.
|
inline |
Returns the permutation that this iterator is currently pointing to.
iterator & regina::PermGroup< n, cached >::iterator::operator++ | ( | ) |
The preincrement operator.
|
inline |
The postincrement operator.
|
default |
Makes this a copy of the given iterator.
|
inline |
Compares this with the given iterator for equality.
To be considered equal, two iterators must be pointing to the same permutation within the same group. (The second condition means that the underlying PermGroup pointers must be the same - it is not enough to have two distinct PermGorup objects with identical contents.)
Two past-the-end iterators will always be considered equal.
rhs | the iterator to compare this with. |
true
if the iterators point to the same permutation, or false
if they do not.