![]() |
Rosetta
2021.16
|
Non-const iterator for edges. More...
#include <LowMemGraph.hh>
Public Member Functions | |
| LowMemEdgeListIter () | |
| Default constructor. Don't use this. More... | |
| LowMemEdgeListIter (LowMemGraphBase *graph, platform::Size cur_offset) | |
| This one is for iterating all the edges. More... | |
| LowMemEdgeListIter (LowMemGraphBase *graph, LowMemNode *owner, platform::Size cur_offset) | |
| LowMemEdgeListIter const & | operator++ () |
| increment operator. Point this iterator at the next element in the list. More... | |
| LowMemEdgeListIter const & | operator-- () |
| decrement operator. Point this iterator at the previous element in the list. More... | |
| bool | operator== (LowMemEdgeListIter const &rhs) const |
| equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists. More... | |
| bool | operator!= (LowMemEdgeListIter const &rhs) const |
| inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists. More... | |
| LowMemEdge * | operator* () const |
| dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself. More... | |
| LowMemEdge & | operator-> () const |
| dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself. More... | |
| bool | valid () const |
| check that this iterator is valid. Will not guarantee that the iterator points at an element that has not been destroyed. More... | |
Protected Member Functions | |
| void | fast_forward () |
| The graph edge list can have deleted edges. This ensures we pass over them. More... | |
| void | fast_backward () |
| This will allow cur_offset_ to go to 0. Which will throw an exception later which is what we want if someone goes past begin. More... | |
Private Attributes | |
| LowMemGraphBase * | graph_ |
| LowMemNode * | owner_ |
| platform::Size | cur_offset_ |
Non-const iterator for edges.
| utility::graph::LowMemEdgeListIter::LowMemEdgeListIter | ( | ) |
Default constructor. Don't use this.
| utility::graph::LowMemEdgeListIter::LowMemEdgeListIter | ( | LowMemGraphBase * | graph, |
| platform::Size | cur_offset | ||
| ) |
This one is for iterating all the edges.
References fast_forward().
| utility::graph::LowMemEdgeListIter::LowMemEdgeListIter | ( | LowMemGraphBase * | graph, |
| LowMemNode * | owner, | ||
| platform::Size | cur_offset | ||
| ) |
|
protected |
This will allow cur_offset_ to go to 0. Which will throw an exception later which is what we want if someone goes past begin.
References cur_offset_, and owner_.
Referenced by operator--().
|
protected |
The graph edge list can have deleted edges. This ensures we pass over them.
References cur_offset_, and owner_.
Referenced by LowMemEdgeListIter(), and operator++().
|
inline |
inequality operator. Do these elements point to different elements from the same list? Asserts that they belong to the same list. Never compare elements from separate lists.
References operator==().
| LowMemEdge * utility::graph::LowMemEdgeListIter::operator* | ( | ) | const |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.
References cur_offset_, debug_assert, graph_, utility::graph::LowMemNode::internal_get_edge(), utility::graph::LowMemGraphBase::internal_get_edge(), owner_, and valid().
| LowMemEdgeListIter const & utility::graph::LowMemEdgeListIter::operator++ | ( | ) |
increment operator. Point this iterator at the next element in the list.
References cur_offset_, debug_assert, fast_forward(), and valid().
| LowMemEdgeListIter const & utility::graph::LowMemEdgeListIter::operator-- | ( | ) |
decrement operator. Point this iterator at the previous element in the list.
References cur_offset_, debug_assert, fast_backward(), and valid().
| LowMemEdge & utility::graph::LowMemEdgeListIter::operator-> | ( | ) | const |
dereference operator: return the edge pointer pointed to by the list element this iterator is hovering over. This method returns a non-const edge pointer, which defines this class as a non-const iterator. There are no methods, though, to access the list element itself.
References cur_offset_, debug_assert, graph_, utility::graph::LowMemNode::internal_get_edge(), utility::graph::LowMemGraphBase::internal_get_edge(), owner_, and valid().
|
inline |
equality operator. Do these elements point at the same list element? Asserts that they belong to the same list. Never compare elements from separate lists.
References cur_offset_, debug_assert, graph_, and owner_.
Referenced by operator!=().
| bool utility::graph::LowMemEdgeListIter::valid | ( | ) | const |
check that this iterator is valid. Will not guarantee that the iterator points at an element that has not been destroyed.
References cur_offset_, graph_, utility::graph::LowMemGraphBase::internal_edge_list_size(), utility::graph::LowMemNode::num_edges(), and owner_.
Referenced by operator*(), operator++(), operator--(), and operator->().
|
private |
Referenced by fast_backward(), fast_forward(), operator*(), operator++(), operator--(), operator->(), operator==(), and valid().
|
private |
Referenced by operator*(), operator->(), operator==(), and valid().
|
private |
Referenced by fast_backward(), fast_forward(), operator*(), operator->(), operator==(), and valid().
1.8.7