binaryfunctions.hh

Go to the documentation of this file.
00001 #ifndef DUNE_BINARYFUNCTIONS_HH
00002 #define DUNE_BINARYFUNCTIONS_HH
00003 
00004 #include<functional>
00005 #include<algorithm>
00006 
00007 namespace Dune
00008 {
00009   template<typename Type>
00010   struct Min
00011     : std::binary_function<Type,Type,Type>
00012   {
00013     Type operator()(const Type& t1, const Type& t2) const
00014     {
00015       return std::min(t1,t2);
00016     }
00017   };
00018   
00019   template<typename Type>
00020   struct Max
00021     : std::binary_function<Type,Type,Type>
00022   {
00023     Type operator()(const Type& t1, const Type& t2) const
00024     {
00025       return std::max(t1,t2);
00026     }
00027   };
00028 }
00029 
00030 #endif

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].