a const iterator which iterates over an Range
More...
#include <Range.hpp>
a const iterator which iterates over an Range
- Examples
- ComputeTriDual.cpp.
Definition at line 459 of file Range.hpp.
◆ const_iterator() [1/2]
moab::Range::const_iterator::const_iterator |
( |
| ) |
|
|
inline |
default constructor - intialize base default constructor
Definition at line 468 of file Range.hpp.
◆ const_iterator() [2/2]
◆ end_of_block()
get an iterator at the end of the block
Get an iterator at the end of the block of consecutive handles that this iterator is currently contained in. That is, if the range contains blocks of consecutive handles of the form { [1,5], [7,100], ... } and this iterator is at any handle in the range [7,100], return an iterator at the '100' handle.
Never returns begin() or end() unless this iterator is at begin() or end(). May return the same location as this iterator.
Definition at line 896 of file Range.hpp.
898 return Range::const_iterator(
mNode,
mNode->second );
References mNode.
Referenced by moab::Core::adjacencies_iterate(), moab::Core::connect_iterate(), moab::Core::coords_iterate(), moab::BitTag::get_entities_with_bits(), moab::BitTag::get_tagged(), moab::ReadHDF5Dataset::next_end(), moab::ReadHDF5Dataset::read(), and moab::DenseTag::tag_iterate().
◆ operator!=()
bool moab::Range::const_iterator::operator!= |
( |
const const_iterator & |
other | ) |
const |
|
inline |
◆ operator*()
const EntityHandle& moab::Range::const_iterator::operator* |
( |
| ) |
const |
|
inline |
dereference that value this iterator points to returns a const reference
Definition at line 478 of file Range.hpp.
◆ operator++() [1/2]
prefix incrementer
Definition at line 484 of file Range.hpp.
◆ operator++() [2/2]
◆ operator+=()
Advance iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator++ step times.
advance iterator
Definition at line 92 of file Range.cpp.
105 if( this_node_rem >= step )
110 step -= this_node_rem + 1;
115 EntityHandle node_size = node->second - node->first + 1;
116 while( step >= node_size )
120 node_size = node->second - node->first + 1;
References moab::Range::PairNode::mNext, mNode, mValue, and operator-=().
◆ operator--() [1/2]
prefix decrementer
Definition at line 510 of file Range.hpp.
◆ operator--() [2/2]
postfix decrementer
Definition at line 526 of file Range.hpp.
◆ operator-=()
Regress iterator specified amount. Potentially O(n), but typically better. Always more efficient than calling operator-- step times.
regress iterator
Definition at line 133 of file Range.cpp.
146 if( this_node_rem >= step )
151 step -= this_node_rem + 1;
156 EntityHandle node_size = node->second - node->first + 1;
157 while( step >= node_size )
161 node_size = node->second - node->first + 1;
References moab::Range::PairNode::mPrev.
Referenced by operator+=().
◆ operator==()
bool moab::Range::const_iterator::operator== |
( |
const const_iterator & |
other | ) |
const |
|
inline |
◆ start_of_block()
get an iterator at the start of the block
Get an iterator at the start of the block of consecutive handles that this iterator is currently contained in. That is, if the range contains blocks of consecutive handles of the form { [1,5], [7,100], ... } and this iterator is at any handle in the range [7,100], return an iterator at the '7' handle.
Never returns end() unless this iterator is at end(). May return the same location as this iterator.
Definition at line 901 of file Range.hpp.
903 return Range::const_iterator(
mNode,
mNode->first );
Referenced by moab::ReadHDF5VarLen::read_offsets().
◆ const_pair_iterator
◆ operator-
Definition at line 793 of file Range.cpp.
795 assert( !it2.mValue || *it2 >= *it1 );
796 if( it2.mNode == it1.mNode )
801 EntityID result = it1.mNode->second - it1.mValue + 1;
802 for( Range::PairNode* n = it1.mNode->mNext; n != it2.mNode; n = n->mNext )
803 result += n->second - n->first + 1;
805 result += it2.mValue - it2.mNode->first;
◆ pair_iterator
◆ Range
◆ mNode
PairNode* moab::Range::const_iterator::mNode |
|
protected |
◆ mValue
The documentation for this class was generated from the following files: