Reference documentation for deal.II version GIT relicensing-422-gb369f187d8 2024-04-17 18:10:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
IndexSet::IntervalIterator Class Reference

#include <deal.II/base/index_set.h>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = IntervalAccessor
 
using difference_type = std::ptrdiff_t
 
using pointer = IntervalAccessor *
 
using reference = IntervalAccessor &
 

Public Member Functions

 IntervalIterator (const IndexSet *idxset, const size_type range_idx)
 
 IntervalIterator (const IndexSet *idxset)
 
 IntervalIterator ()
 
 IntervalIterator (const IntervalIterator &other)=default
 
IntervalIteratoroperator= (const IntervalIterator &other)=default
 
IntervalIteratoroperator++ ()
 
IntervalIterator operator++ (int)
 
const IntervalAccessoroperator* () const
 
const IntervalAccessoroperator-> () const
 
bool operator== (const IntervalIterator &) const
 
bool operator!= (const IntervalIterator &) const
 
bool operator< (const IntervalIterator &) const
 
int operator- (const IntervalIterator &p) const
 

Private Attributes

IntervalAccessor accessor
 

Detailed Description

Class that represents an iterator pointing to a contiguous interval \([a,b[\) as returned by IndexSet::begin_interval().

Definition at line 748 of file index_set.h.

Member Typedef Documentation

◆ iterator_category

using IndexSet::IntervalIterator::iterator_category = std::forward_iterator_tag

Mark the class as forward iterator and declare some alias which are standard for iterators and are used by algorithms to enquire about the specifics of the iterators they work on.

Definition at line 834 of file index_set.h.

◆ value_type

Definition at line 835 of file index_set.h.

◆ difference_type

Definition at line 836 of file index_set.h.

◆ pointer

Definition at line 837 of file index_set.h.

◆ reference

Definition at line 838 of file index_set.h.

Constructor & Destructor Documentation

◆ IntervalIterator() [1/4]

IndexSet::IntervalIterator::IntervalIterator ( const IndexSet idxset,
const size_type  range_idx 
)
inline

Construct a valid iterator pointing to the interval with index range_idx.

Definition at line 1339 of file index_set.h.

◆ IntervalIterator() [2/4]

IndexSet::IntervalIterator::IntervalIterator ( const IndexSet idxset)
inlineexplicit

Construct an invalid iterator (used as end()).

Definition at line 1353 of file index_set.h.

◆ IntervalIterator() [3/4]

IndexSet::IntervalIterator::IntervalIterator ( )
inline

Construct an empty iterator.

Definition at line 1347 of file index_set.h.

◆ IntervalIterator() [4/4]

IndexSet::IntervalIterator::IntervalIterator ( const IntervalIterator other)
default

Copy constructor from other iterator.

Member Function Documentation

◆ operator=()

IntervalIterator & IndexSet::IntervalIterator::operator= ( const IntervalIterator other)
default

Assignment of another iterator.

◆ operator++() [1/2]

IndexSet::IntervalIterator & IndexSet::IntervalIterator::operator++ ( )
inline

Prefix increment.

Definition at line 1360 of file index_set.h.

◆ operator++() [2/2]

IndexSet::IntervalIterator IndexSet::IntervalIterator::operator++ ( int  )
inline

Postfix increment.

Definition at line 1369 of file index_set.h.

◆ operator*()

const IndexSet::IntervalAccessor & IndexSet::IntervalIterator::operator* ( ) const
inline

Dereferencing operator, returns an IntervalAccessor.

Definition at line 1379 of file index_set.h.

◆ operator->()

const IndexSet::IntervalAccessor * IndexSet::IntervalIterator::operator-> ( ) const
inline

Dereferencing operator, returns a pointer to an IntervalAccessor.

Definition at line 1387 of file index_set.h.

◆ operator==()

bool IndexSet::IntervalIterator::operator== ( const IntervalIterator other) const
inline

Comparison.

Definition at line 1395 of file index_set.h.

◆ operator!=()

bool IndexSet::IntervalIterator::operator!= ( const IntervalIterator other) const
inline

Inverse of ==.

Definition at line 1404 of file index_set.h.

◆ operator<()

bool IndexSet::IntervalIterator::operator< ( const IntervalIterator other) const
inline

Comparison operator.

Definition at line 1412 of file index_set.h.

◆ operator-()

int IndexSet::IntervalIterator::operator- ( const IntervalIterator p) const
inline

Return the distance between the current iterator and the argument. The distance is given by how many times one has to apply operator++ to the current iterator to get the argument (for a positive return value), or operator-- (for a negative return value).

Definition at line 1422 of file index_set.h.

Member Data Documentation

◆ accessor

IntervalAccessor IndexSet::IntervalIterator::accessor
private

Accessor that contains what IndexSet and interval we are pointing at.

Definition at line 844 of file index_set.h.


The documentation for this class was generated from the following file: