libMesh::QoISet::iterator Class Reference

#include <qoi_set.h>

Public Member Functions

 iterator (std::size_t i, const std::vector< bool > &v)
 
std::size_t operator* () const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
bool operator== (const iterator &other) const
 
bool operator!= (const iterator &other) const
 

Private Attributes

std::size_t _i
 
const std::vector< bool > & _vecbool
 

Detailed Description

Definition at line 48 of file qoi_set.h.

Constructor & Destructor Documentation

◆ iterator()

libMesh::QoISet::iterator::iterator ( std::size_t  i,
const std::vector< bool > &  v 
)
inline

Definition at line 51 of file qoi_set.h.

References _i, and _vecbool.

51  : _i(i), _vecbool(v)
52  {
53  while (_i < _vecbool.size() && !_vecbool[_i])
54  _i++;
55  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:87

Member Function Documentation

◆ operator!=()

bool libMesh::QoISet::iterator::operator!= ( const iterator other) const
inline

Definition at line 78 of file qoi_set.h.

References _i, and _vecbool.

78  {
79  libmesh_assert_equal_to (&_vecbool, &other._vecbool);
80  return _i != other._i;
81  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:87

◆ operator*()

std::size_t libMesh::QoISet::iterator::operator* ( ) const
inline

Definition at line 57 of file qoi_set.h.

References _i.

57 { return _i; }

◆ operator++() [1/2]

iterator& libMesh::QoISet::iterator::operator++ ( )
inline

Definition at line 59 of file qoi_set.h.

References _i, and _vecbool.

60  {
61  do {
62  _i++;
63  } while (_i < _vecbool.size() && !_vecbool[_i]);
64  return *this;
65  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:87

◆ operator++() [2/2]

iterator libMesh::QoISet::iterator::operator++ ( int  )
inline

Definition at line 67 of file qoi_set.h.

67  {
68  iterator it = *this;
69  ++(*this);
70  return it;
71  }
iterator(std::size_t i, const std::vector< bool > &v)
Definition: qoi_set.h:51

◆ operator==()

bool libMesh::QoISet::iterator::operator== ( const iterator other) const
inline

Definition at line 73 of file qoi_set.h.

References _i, and _vecbool.

73  {
74  libmesh_assert_equal_to (&_vecbool, &other._vecbool);
75  return _i == other._i;
76  }
const std::vector< bool > & _vecbool
Definition: qoi_set.h:87

Member Data Documentation

◆ _i

std::size_t libMesh::QoISet::iterator::_i
private

Definition at line 85 of file qoi_set.h.

Referenced by iterator(), operator!=(), operator*(), operator++(), and operator==().

◆ _vecbool

const std::vector<bool>& libMesh::QoISet::iterator::_vecbool
private

Definition at line 87 of file qoi_set.h.

Referenced by iterator(), operator!=(), operator++(), and operator==().


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