Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

scale.h

Go to the documentation of this file.
00001 
00010 #ifndef __SCALE_H__
00011 #define __SCALE_H__
00012 
00013 #include <functional>
00014 
00015 
00020 namespace Scale {
00021 
00022 
00023 
00027 template<class T=double>
00028 struct Identity : public std::unary_function<T,T> {
00029   inline T operator() (const T& val) const {  return val;  }
00030 };
00031  
00032 
00033 
00040 template<class T=double>
00041 struct Linear : public std::unary_function<T,T> {
00042   T multiplier, offset;
00043 
00044   Linear(const T& mult=T(1), const T& off=T(0))
00045     : multiplier(mult), offset(off)  {  }
00046   
00047   inline T operator() (T val) const 
00048     {  return val*multiplier + offset;  }
00049 };
00050  
00051 } /* namespace Scale */
00052 #endif /* __SCALE_H__ */

Generated on Mon Jan 20 02:35:45 2003 for RF-LISSOM by doxygen1.3-rc2