33 #include "DGtal/base/Common.h"
34 #include "DGtal/helpers/StdDefs.h"
35 #include "DGtal/kernel/BasicPointPredicates.h"
36 #include "DGtal/images/ImageSelector.h"
40 using namespace DGtal;
51 template <
typename Po
intFunctor1,
typename Predicate1,
typename Po
intFunctor2,
typename Predicate2>
53 testPointPredicateConcepts()
62 typedef std::logical_and<bool> BinaryFunctor;
69 typedef typename PointFunctor1::Point Point;
89 int main(
int argc,
char** argv )
93 for (
int i = 0; i < argc; ++i )
99 typedef std::binder2nd< std::less<int> > IntPredicate;
101 typedef std::binder2nd< std::greater<float> > FloatPredicate;
102 res &= testPointPredicateConcepts<IntImage, IntPredicate, FloatImage, FloatPredicate>();
104 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
Aim: The predicate returns true when the point predicate given at construction return false...
Aim: The predicate returns true when the point given as argument equals the reference point given at ...
Aim: Gathers several functions useful for concept checks.
functors namespace gathers all DGtal functors.
Aim: The predicate returns true when the point is above (or equal) the given lower bound...
Aim: The predicate that returns always false.
Aim: Defines a predicate on a point.
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: The predicate returns true when the point is below (or equal) the given upper bound...
Aim: The predicate returns true when the given binary functor returns true for the two PointPredicate...
Aim: The predicate that returns always true.
Aim: The predicate returns true when the predicate returns true for the value assigned to a given poi...