DGtal  1.5.beta
DGtal::CubicalComplex< TKSpace, TCellContainer >::DefaultCellMapIteratorPriority Struct Reference

#include <DGtal/topology/CubicalComplex.h>

Public Member Functions

bool operator() (const CellMapIterator &it1, const CellMapIterator &it2) const
 

Detailed Description

template<typename TKSpace, typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
struct DGtal::CubicalComplex< TKSpace, TCellContainer >::DefaultCellMapIteratorPriority

This structure is used to order cells (represented by their iterator in the CubicalComplex container) in a priority queue. By default, it compares the values associated to each cell (the value is the cell data masked by VALUE).

Definition at line 282 of file CubicalComplex.h.

Member Function Documentation

◆ operator()()

template<typename TKSpace , typename TCellContainer = typename TKSpace::template CellMap< CubicalCellData >::Type>
bool DGtal::CubicalComplex< TKSpace, TCellContainer >::DefaultCellMapIteratorPriority::operator() ( const CellMapIterator it1,
const CellMapIterator it2 
) const
inline

This operator compares two cells specified by their iterators it1 and it2 and returns true whenever it1 has smallest data & VALUE than it2.

Parameters
it1any iterator on a cell of this cubical complex.
it2any iterator on a cell of this cubical complex.
Returns
'true' iff the value part of the data of it1 is smaller than the one of it2.

Definition at line 293 of file CubicalComplex.h.

294  {
295  uint32_t v1 = it1->second.data & VALUE;
296  uint32_t v2 = it2->second.data & VALUE;
297  return ( v1 < v2 )
298  || ( ( v1 == v2 ) && ( it1->first < it2->first ) );
299  }
boost::uint32_t uint32_t
unsigned 32-bit integer.
Definition: BasicTypes.h:63

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