Key
and Value
are inherited from M
. Value
must be comparable to 0
and the unary -
operator must be defined for it, of course.
struct _UnConvertible {}; template<class A> inline A t_abs(A a) {return _UnConvertible();} template<> inline int t_abs<>(int n) {return abs(n);} template<> inline long int t_abs<>(long int n) {return labs(n);} template<> inline long long int t_abs<>(long long int n) {return ::llabs(n);} template<> inline float t_abs<>(float n) {return fabsf(n);} template<> inline double t_abs<>(double n) {return fabs(n);} template<> inline long double t_abs<>(long double n) {return fabsl(n);}
#include <lemon/maps.h>
Public Member Functions | |
AbsMap (const M &_m) | |
Constructor. | |
Value | operator[] (Key k) const |
| |
Related Functions | |
(Note that these are not member functions.) | |
template<typename M > | |
AbsMap< M > | absMap (const M &m) |
Returns an AbsMap class. |