Regina 7.3 Calculation Engine
|
The iterator type for this table view. More...
#include <utilities/tableview.h>
Public Types | |
using | value_type = std::remove_reference_t< Subview > |
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 = ptrdiff_t |
The type obtained by subtracting iterators. More... | |
using | pointer = const value_type * |
A pointer to value_type. More... | |
using | reference = Subview |
The type returned by the dereference operator, which could be by value (for a multi-dimensional table) or by reference (for a one-dimensional table). More... | |
Public Member Functions | |
iterator ()=default | |
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... | |
iterator & | operator-- () |
The predecrement operator. More... | |
iterator | operator-- (int) |
The postdecrement operator. More... | |
Subview | operator* () const |
Returns the subarray or element of the underlying table that this iterator is currently pointing to. More... | |
Friends | |
class | TableView |
The iterator type for this table view.
For a TableView t, an iterator of this type runs through the subarrays/elements t[0]
, t[1]
, ..., in order from first to last. See TableView::begin() for further details.
This iterator is, in spirit, a bidirectional multipass iterator. However, we declare it using std::input_iterator_tag here because it does not necessarily return by reference (a requirement of forward and bidirectional iterators in the C++ standard library). In particular:
const Element&
.Both iterator and const_iterator are the same type, since TableView only offers read-only access to the underlying data.
using regina::TableView< Element, dim1, dim >::iterator::difference_type = ptrdiff_t |
The type obtained by subtracting iterators.
using regina::TableView< Element, dim1, dim >::iterator::iterator_category = std::input_iterator_tag |
Declares this to be an input iterator type.
using regina::TableView< Element, dim1, dim >::iterator::pointer = const value_type* |
A pointer to value_type.
using regina::TableView< Element, dim1, dim >::iterator::reference = Subview |
The type returned by the dereference operator, which could be by value (for a multi-dimensional table) or by reference (for a one-dimensional table).
See the iterator class notes for details.
using regina::TableView< Element, dim1, dim >::iterator::value_type = std::remove_reference_t<Subview> |
Indicates what type the iterator points to.
|
default |
Creates a new uninitialised iterator.
|
default |
Creates a copy of the given iterator.
|
inline |
Compares this with the given iterator for inequality.
rhs | the iterator to compare this with. |
false
if the iterators point to the same subarray/element of the underlying table, or true
if they do not.
|
inline |
Returns the subarray or element of the underlying table that this iterator is currently pointing to.
The return type follows the same design as TableView::operator[]. For a one-dimensional table it returns the current table element, by const reference. For a multi-dimensional table it returns a TableView of of smaller dimension, by value, representing the slice of the overall table that is obtained when the first array index is fixed at the current iterator position.
|
inline |
The preincrement operator.
|
inline |
The postincrement operator.
|
inline |
The predecrement operator.
|
inline |
The postdecrement operator.
|
default |
Makes this a copy of the given iterator.
|
inline |
Compares this with the given iterator for equality.
rhs | the iterator to compare this with. |
true
if the iterators point to the same subarray/element of the underlying table, or false
if they do not.