Inviwo  0.9.10.1
Inviwo documentation
inviwo::discretedata::ConnectionIterator Class Reference

#include <connectioniterator.h>

Public Member Functions

 ConnectionIterator (const Connectivity *parent, GridPrimitive dimension, std::shared_ptr< const std::vector< ind >> neighborhood, ind index=0)
 
ElementIterator operator * () const
 
ConnectionIteratoroperator++ ()
 
ConnectionIterator operator++ (int)
 
ConnectionIteratoroperator-- ()
 
ConnectionIterator operator-- (int)
 
ConnectionIterator operator+ (ind offset)
 
ConnectionIteratoroperator+= (ind offset)
 
ConnectionIterator operator- (ind offset)
 
ConnectionIteratoroperator-= (ind offset)
 
bool operator== (ConnectionIterator &other)
 
bool operator!= (ConnectionIterator &other)
 
GridPrimitive getType () const
 GridPrimitive type the iterator walks through.
 
ind getIndex () const
 The current index. Equivalent to dereferencing.
 
ConnectionRange connection (GridPrimitive type) const
 Iterate over connected GridPrimitives (neighbors etc)
 

Protected Attributes

ind toIndex_
 Index to the current element.
 
const Connectivityparent_
 Pointer to Connectivity iterated through - Does not delete.
 
const GridPrimitive toDimension_
 GridPrimitive type iterated over (0D vertices etc)
 
std::shared_ptr< const std::vector< ind > > connection_
 List of neighborhood indices.
 

Friends

ConnectionIterator operator+ (ind, ConnectionIterator &)
 
ConnectionIterator operator- (ind, ConnectionIterator &)
 

Detailed Description

Iterates over one GridPrimitive type in a Connectivity.

Member Function Documentation

◆ operator==()

bool inviwo::discretedata::ConnectionIterator::operator== ( ConnectionIterator other)
inline

Compare. Has false positives with iterators started from different elements but suffices for iteration


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