DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions
DGtal::details::PointValueCompare< T > Class Template Reference

#include <FMM.h>

Public Member Functions

bool operator() (const T &a, const T &b)

Detailed Description

template<typename T>
class DGtal::details::PointValueCompare< T >

Aim: Small binary predicate to order candidates points according to their (absolute) distance value.

Description of template class 'PointValueCompare'

Template Parameters:
Tmodel of pair Point-Value

Definition at line 77 of file FMM.h.


Member Function Documentation

template<typename T >
bool DGtal::details::PointValueCompare< T >::operator() ( const T &  a,
const T &  b 
)
inline

Comparison function

Parameters:
aan object of type T
banother object of type T
Returns:
'true' if a<b but 'false' otherwise

Definition at line 87 of file FMM.h.

{
if ( std::abs(a.second) == std::abs(b.second) )
{ //point comparison
return (a.first < b.first);
}
else //distance comparison
//(in absolute value in order to deal with
//signed distance values)
return ( std::abs(a.second) < std::abs(b.second) );
}

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