14 template <
typename _Type>
21 return std::abs(elt2) > std::abs(elt1);
29 template <
typename _Type>
34 this -> target_elt = value;
42 return std::abs(elt2 - target_elt) > std::abs(elt1 - target_elt);
52 template <
typename _Type>
56 return x + std::abs(y);
62 template <
typename _Type>
66 return x + std::pow(std::abs(y), 2.);
73 template <
class _containerType,
typename _valueType>
74 class scale_functor :
public std::unary_function< _valueType, _containerType > {
77 scale_functor(_valueType value) : std::unary_function< _valueType, _containerType>() {
84 return elt * MULTIPLIER;
88 _valueType MULTIPLIER;
A function object used to accumulate the absolute value of a container.
double operator()(double x, _Type y)
A function object predicate that first computes the absolute difference between two elements and a sp...
bool operator()(_Type elt1, _Type elt2)
Returns true of the first argument is closer to the specified (in constructor) value than the second ...
absDiff_predicate(_Type value)
A function object used to accumulate the square of the absolute value of a container.
double operator()(double x, _Type y)
A function object predicate that compares the absolute value of two elements and returns a true of el...
bool operator()(_Type elt1, _Type elt2)
Return true if argument 1 < argument 2.
A unary pure function object that scales through multiplication.
_containerType operator()(_containerType elt)
scale_functor(_valueType value)
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...