Public Member Functions | List of all members
mirtk::EdgeIterator Class Reference

#include <EdgeTable.h>

Collaboration diagram for mirtk::EdgeIterator:
Collaboration graph

Public Member Functions

 EdgeIterator (const EdgeTable &table)
 Constructor.
 
 EdgeIterator (const EdgeTable &table, int begin, int end=-1)
 Constructor.
 
template<class IdType >
int GetNextEdge (IdType &ptId1, IdType &ptId2)
 
void InitTraversal (int begin=0, int end=-1)
 
template<class IdType >
void InitTraversal (const blocked_range< IdType > &re)
 Initialize traversal of edges in range.
 

Detailed Description

Thread-safe helper class for iteration of edges

Definition at line 200 of file EdgeTable.h.

Member Function Documentation

§ GetNextEdge()

template<class IdType >
int mirtk::EdgeIterator::GetNextEdge ( IdType &  ptId1,
IdType &  ptId2 
)
inline

Get next edge

Parameters
[out]ptId1ID of first edge point.
[out]ptId2ID of second edge point.
Returns
ID of undirected edge (ptId1, ptId2) or -1 if end reached

Definition at line 271 of file EdgeTable.h.

§ InitTraversal()

void mirtk::EdgeIterator::InitTraversal ( int  begin = 0,
int  end = -1 
)
inline

Initialize traversal of edges

Parameters
[in]beginID of first edge to iterate.
[in]endID one behind last edge to iterate. If negative, all edges from begin until the end are iterated.
Bug:
Not sure if this functions works correctly for begin > 0, cf., AverageEdgeLength implementation.

Definition at line 234 of file EdgeTable.h.


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