Chombo + EB  3.2
Public Member Functions | Private Attributes | List of all members
IVSIterator Class Reference

Iterator for an IntVectSet. More...

#include <IntVectSet.H>

Public Member Functions

 IVSIterator ()
 
 IVSIterator (const IntVectSet &ivs)
 
 ~IVSIterator ()
 
void define (const IntVectSet &ivs)
 
const IntVectoperator() () const
 returns the IntVect that this iterator is at More...
 
const IntVectiv () const
 same as operator() More...
 
bool ok () const
 returns true if this iterator is still in its IntVectSet More...
 
void operator++ ()
 move iterator to the next IntVect in its IntVectSet More...
 
void incr ()
 same as operator++ More...
 
void begin ()
 initialize this iterator to the first IntVect in its IntVectSet More...
 
void reset ()
 same as begin() More...
 
void end ()
 move this iterator to after the last IntVect in the set More...
 

Private Attributes

bool m_isdense
 
DenseIntVectSetIterator m_dense
 
TreeIntVectSetIterator m_tree
 

Detailed Description

Iterator for an IntVectSet.

IVSIterator iterates over every point (IntVect) in an IntVectSet. It has exactly the same syntax and sematic as BoxIterator. Typical usage:

...
IVSIterator ivsit (ivs);
for (ivsit.begin(); ivsit.ok(); ++ivsit)
{
IntVect iv = ivsit();
(do operations involving iv)
}

Constructor & Destructor Documentation

◆ IVSIterator() [1/2]

IVSIterator::IVSIterator ( )
inline

A default constructed iterator iterates over an empty IntVectSet. It starts in the begin() state, and is never ok().

References IntVectSet::IVSIterator.

◆ IVSIterator() [2/2]

IVSIterator::IVSIterator ( const IntVectSet ivs)

Iterates over IntVectSet ivs. There is no canonical ordering. Starts in the begin() state.

◆ ~IVSIterator()

IVSIterator::~IVSIterator ( )
inline

References IntVectSet::define().

Member Function Documentation

◆ define()

void IVSIterator::define ( const IntVectSet ivs)

Modifies this IVSIterator to iterate over the IntVectSet ivs. There is no canonical ordering. Starts in the begin() state.

◆ operator()()

const IntVect & IVSIterator::operator() ( ) const
inline

returns the IntVect that this iterator is at

References IntVectSet::m_dense, and IntVectSet::m_isdense.

◆ iv()

const IntVect& IVSIterator::iv ( ) const
inline

same as operator()

Referenced by IntVectSet::copy(), and IntVectSet::minus_intvect().

◆ ok()

bool IVSIterator::ok ( ) const
inline

◆ operator++()

void IVSIterator::operator++ ( )
inline

move iterator to the next IntVect in its IntVectSet

References IntVectSet::m_dense, and IntVectSet::m_isdense.

◆ incr()

void IVSIterator::incr ( )
inline

same as operator++

◆ begin()

void IVSIterator::begin ( )
inline

initialize this iterator to the first IntVect in its IntVectSet

References IntVectSet::m_dense, and IntVectSet::m_isdense.

◆ reset()

void IVSIterator::reset ( )
inline

◆ end()

void IVSIterator::end ( )
inline

move this iterator to after the last IntVect in the set

The iterator will be !ok() afterwards.

References IntVectSet::m_dense, and IntVectSet::m_isdense.

Member Data Documentation

◆ m_isdense

bool IVSIterator::m_isdense
private

◆ m_dense

DenseIntVectSetIterator IVSIterator::m_dense
private

◆ m_tree

TreeIntVectSetIterator IVSIterator::m_tree
private

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