5 #ifndef __pinocchio_math_comparison_operators_hpp__ 6 #define __pinocchio_math_comparison_operators_hpp__ 11 #define PINOCCHIO_DEFINE_COMPARISON_OP(name,OP) \ 14 template<typename T1, typename T2> \ 15 static bool call(const T1 & a, const T2 & b) \ 19 PINOCCHIO_DEFINE_COMPARISON_OP(equal_to_op,==);
20 PINOCCHIO_DEFINE_COMPARISON_OP(not_equal_to_op,!=);
21 PINOCCHIO_DEFINE_COMPARISON_OP(less_than_op,<);
22 PINOCCHIO_DEFINE_COMPARISON_OP(greater_than_op,>);
23 PINOCCHIO_DEFINE_COMPARISON_OP(less_than_or_equal_to_op,<=);
24 PINOCCHIO_DEFINE_COMPARISON_OP(greater_than_or_equal_to_op,>=);
27 template<
class OP,
bool condition,
bool default_return_value>
30 template<
typename T1,
typename T2>
31 static bool op(
const T1 & ,
const T2 & )
33 return default_return_value;
37 template<
class OP,
bool default_return_value>
40 template<
typename T1,
typename T2>
41 static bool op(
const T1 & a,
const T2 & b)
48 #endif //#ifndef __pinocchio_math_comparison_operators_hpp__ Main pinocchio namespace.