DGtal  1.5.beta
DGtal::detail::PointValueCompare< T > Class Template Reference

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

#include <DGtal/geometry/volumes/distance/FMM.h>

Public Member Functions

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

Detailed Description

template<typename T>
class DGtal::detail::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

◆ operator()()

template<typename T >
bool DGtal::detail::PointValueCompare< T >::operator() ( const T &  a,
const T &  b 
) const
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.

88  {
89  if ( std::abs(a.second) == std::abs(b.second) )
90  { //point comparison
91  return (a.first < b.first);
92  }
93  else //distance comparison
94  //(in absolute value in order to deal with
95  //signed distance values)
96  return ( std::abs(a.second) < std::abs(b.second) );
97  }

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