Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AbsMap Class Template Reference
[Maps]

#include <lemon/maps.h>

List of all members.


Detailed Description

template<class M>
class lemon::AbsMap< M >

This read only map returns the absolute value of the value returned by the given map. Its Key and Value will be inherited from M. Value must be comparable to 0 and the unary - operator must be defined for it, of course.

Bug:
We need a unified way to handle the situation below:
       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);}

Definition at line 521 of file maps.h.

Public Member Functions

 AbsMap (const M &_m)
 Constructor.

Related Functions

(Note that these are not member functions.)

AbsMap< M > absMap (const M &m)
 Returns a AbsMap class.


Constructor & Destructor Documentation

AbsMap const M &  _m  )  [inline]
 

Definition at line 532 of file maps.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:53 2005 for LEMON by  doxygen 1.4.1