DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions
DGtal::functors::Point2ShapePredicateComparator< T, b1, b2 > Struct Template Reference

Aim: A small struct with an operator that compares two values according to two bool template parameters. More...

#include <DGtal/shapes/fromPoints/Point2ShapePredicate.h>

Public Member Functions

bool operator() (const T &q, const T &t) const
 

Detailed Description

template<typename T, bool b1, bool b2>
struct DGtal::functors::Point2ShapePredicateComparator< T, b1, b2 >

Aim: A small struct with an operator that compares two values according to two bool template parameters.

Template Parameters
Ttype for a signed quantity that is comparable
b1a bool for the comparison sign ('true' for >, 'false' for <)
b2a bool for the equality ('true' for a large inequality, 'false' for a strict inequality)

NB: only specialized versions should be used.

See also
Point2ShapePredicate

Definition at line 177 of file Point2ShapePredicate.h.

Member Function Documentation

◆ operator()()

template<typename T , bool b1, bool b2>
bool DGtal::functors::Point2ShapePredicateComparator< T, b1, b2 >::operator() ( const T &  q,
const T &  t 
) const
inline

Compares two values.

Parameters
qleft value.
tright value.
Returns
'true' if q < t, 'false' otherwise

Definition at line 184 of file Point2ShapePredicate.h.

185 {
186 std::less<T> c;
187 return c(q,t);
188 }

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