#include <GenericOverlapFinder.h>
Public Member Functions | |
template<typename T1 , typename T2 > | |
double | operator() (const T1 &t1, const T2 &t2) const |
OverlapDistance () | |
OverlapDistance (const Comparator &comp) | |
Private Attributes | |
Comparator | comp_ |
Turn a comparator in a distance for uses of overlap comparator(x,y) = true <-> x and y overlap the associated distance would work as dist(x,y) = 1.0 - comparator(x,y) [0 if overlap, 1 otherwise] if the constructor of your Comparator does not need parameters, then the associated distance will not need parameters too.
Definition at line 24 of file GenericOverlapFinder.h.
pat::OverlapDistance< Comparator >::OverlapDistance | ( | ) | [inline] |
Definition at line 26 of file GenericOverlapFinder.h.
{}
pat::OverlapDistance< Comparator >::OverlapDistance | ( | const Comparator & | comp | ) | [inline] |
Definition at line 27 of file GenericOverlapFinder.h.
: comp_(comp) {}
double pat::OverlapDistance< Comparator >::operator() | ( | const T1 & | t1, |
const T2 & | t2 | ||
) | const [inline] |
Definition at line 29 of file GenericOverlapFinder.h.
References pat::OverlapDistance< Comparator >::comp_.
{ return 1.0 - comp_(t1,t2); }
Comparator pat::OverlapDistance< Comparator >::comp_ [private] |
Definition at line 33 of file GenericOverlapFinder.h.
Referenced by pat::OverlapDistance< Comparator >::operator()().