PLaSK library
Loading...
Searching...
No Matches
plask::RectangularMaskedMeshBase< DIM >::const_iterator Class Reference

Iterator over nodes coordinates. More...

#include <plask/mesh/rectangular_masked_common.hpp>

Inheritance diagram for plask::RectangularMaskedMeshBase< DIM >::const_iterator:
[legend]
Collaboration diagram for plask::RectangularMaskedMeshBase< DIM >::const_iterator:
[legend]

Public Member Functions

template<typename... CtorArgs>
 const_iterator (const RectangularMaskedMeshBase &mesh, CtorArgs &&... ctorArgs)
 
const CompressedSetOfNumbers< std::size_t > & set () const
 
- Public Member Functions inherited from plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< const_iterator, LocalCoords >
 ConstIteratorFacade ()
 Construct uninitialized iterator. Don't use it before initialization (which can be done by calling of setIndex method).
 
 ConstIteratorFacade (std::size_t index, ConstSegmentIterator segmentIterator)
 
 ConstIteratorFacade (std::size_t index)
 
std::size_t getIndex () const
 Get current iterator position (index).
 
void setIndex (std::size_t index)
 
number_t getNumber () const
 

Friends

class boost::iterator_core_access
 

Additional Inherited Members

- Public Types inherited from plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< const_iterator, LocalCoords >
typedef std::vector< Segment >::const_iterator ConstSegmentIterator
 
- Public Attributes inherited from plask::CompressedSetOfNumbers< number_t >::ConstIteratorFacade< const_iterator, LocalCoords >
ConstSegmentIterator segmentIterator
 Current segment (which includes current index). It is stored in order to speed up dereference operation.
 
std::size_t index
 Current index.
 

Detailed Description

template<int DIM>
class plask::RectangularMaskedMeshBase< DIM >::const_iterator

Iterator over nodes coordinates.

It implements const_iterator for masked meshes.

Iterator of this type is faster than IndexedIterator used by parent class of masked meshes, as it has constant time dereference operation while at method has logarithmic time complexity.

One can use:

  • getIndex() method of the iterator to get index of the node,
  • getNumber() method of the iterator to get index of the node in the wrapped mesh.

Definition at line 260 of file rectangular_masked_common.hpp.

Constructor & Destructor Documentation

◆ const_iterator()

template<int DIM>
template<typename... CtorArgs>
plask::RectangularMaskedMeshBase< DIM >::const_iterator::const_iterator ( const RectangularMaskedMeshBase mesh,
CtorArgs &&...  ctorArgs 
)
inlineexplicit

Definition at line 273 of file rectangular_masked_common.hpp.

Member Function Documentation

◆ set()

template<int DIM>
const CompressedSetOfNumbers< std::size_t > & plask::RectangularMaskedMeshBase< DIM >::const_iterator::set ( ) const
inline

Definition at line 276 of file rectangular_masked_common.hpp.

Friends And Related Symbol Documentation

◆ boost::iterator_core_access

template<int DIM>
friend class boost::iterator_core_access
friend

Definition at line 262 of file rectangular_masked_common.hpp.


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