deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+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 Member Functions | Private Attributes | List of all members
hp::CollectionIterator< T > Class Template Reference

#include <deal.II/hp/collection.h>

Public Member Functions

 CollectionIterator (const std::vector< std::shared_ptr< const T > > &data, const std::size_t index)
 
 CollectionIterator (const CollectionIterator< T > &other)=default
 
CollectionIterator< T > & operator= (const CollectionIterator< T > &other)=default
 
bool operator== (const CollectionIterator< T > &other) const
 
bool operator!= (const CollectionIterator< T > &other) const
 
bool operator< (const CollectionIterator< T > &other) const
 
bool operator<= (const CollectionIterator< T > &other) const
 
bool operator> (const CollectionIterator< T > &other) const
 
bool operator>= (const CollectionIterator< T > &other) const
 
const T & operator* () const
 
CollectionIterator< T > & operator++ ()
 
CollectionIterator< T > & operator+= (const std::size_t offset)
 
CollectionIterator< T > & operator-- ()
 
CollectionIterator< T > operator+ (const std::size_t &offset) const
 
std::ptrdiff_t operator- (const CollectionIterator< T > &other) const
 

Private Attributes

const std::vector< std::shared_ptr< const T > > * data
 
std::size_t index
 

Detailed Description

template<typename T>
class hp::CollectionIterator< T >

An iterator for hp::Collection.

Definition at line 45 of file collection.h.

Constructor & Destructor Documentation

◆ CollectionIterator() [1/2]

template<typename T >
hp::CollectionIterator< T >::CollectionIterator ( const std::vector< std::shared_ptr< const T > > &  data,
const std::size_t  index 
)
inline

Constructor.

Parameters
dataThe actual data of hp::Collection.
indexThe current index.

Definition at line 54 of file collection.h.

◆ CollectionIterator() [2/2]

template<typename T >
hp::CollectionIterator< T >::CollectionIterator ( const CollectionIterator< T > &  other)
default

Copy constructor.

Member Function Documentation

◆ operator=()

template<typename T >
CollectionIterator< T > & hp::CollectionIterator< T >::operator= ( const CollectionIterator< T > &  other)
default

Copy assignment.

◆ operator==()

template<typename T >
bool hp::CollectionIterator< T >::operator== ( const CollectionIterator< T > &  other) const
inline

Compare for equality.

Definition at line 75 of file collection.h.

◆ operator!=()

template<typename T >
bool hp::CollectionIterator< T >::operator!= ( const CollectionIterator< T > &  other) const
inline

Compare for inequality.

Definition at line 85 of file collection.h.

◆ operator<()

template<typename T >
bool hp::CollectionIterator< T >::operator< ( const CollectionIterator< T > &  other) const
inline

Compare indices.

Definition at line 94 of file collection.h.

◆ operator<=()

template<typename T >
bool hp::CollectionIterator< T >::operator<= ( const CollectionIterator< T > &  other) const
inline

Compare indices.

Definition at line 104 of file collection.h.

◆ operator>()

template<typename T >
bool hp::CollectionIterator< T >::operator> ( const CollectionIterator< T > &  other) const
inline

Compare indices.

Definition at line 115 of file collection.h.

◆ operator>=()

template<typename T >
bool hp::CollectionIterator< T >::operator>= ( const CollectionIterator< T > &  other) const
inline

Compare indices.

Definition at line 125 of file collection.h.

◆ operator*()

template<typename T >
const T & hp::CollectionIterator< T >::operator* ( ) const
inline

Dereferencing operator: returns the value of the current index.

Definition at line 135 of file collection.h.

◆ operator++()

template<typename T >
CollectionIterator< T > & hp::CollectionIterator< T >::operator++ ( )
inline

Prefix ++ operator: ++iterator. This operator advances the iterator to the next index and returns a reference to *this.

Definition at line 147 of file collection.h.

◆ operator+=()

template<typename T >
CollectionIterator< T > & hp::CollectionIterator< T >::operator+= ( const std::size_t  offset)
inline

This operator advances the iterator by offset and returns a reference to *this.

Definition at line 159 of file collection.h.

◆ operator--()

template<typename T >
CollectionIterator< T > & hp::CollectionIterator< T >::operator-- ( )
inline

Prefix operator: –iterator. This operator advances the iterator to the previous index and returns a reference to *this.

Definition at line 172 of file collection.h.

◆ operator+()

template<typename T >
CollectionIterator< T > hp::CollectionIterator< T >::operator+ ( const std::size_t &  offset) const
inline

Create new iterator, which is shifted by offset.

Definition at line 186 of file collection.h.

◆ operator-()

template<typename T >
std::ptrdiff_t hp::CollectionIterator< T >::operator- ( const CollectionIterator< T > &  other) const
inline

Compute distance between this iterator and iterator other.

Definition at line 196 of file collection.h.

Member Data Documentation

◆ data

template<typename T >
const std::vector<std::shared_ptr<const T> >* hp::CollectionIterator< T >::data
private

Pointer to the actual data of hp::Collection.

Definition at line 206 of file collection.h.

◆ index

template<typename T >
std::size_t hp::CollectionIterator< T >::index
private

Current index.

Definition at line 211 of file collection.h.


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