dune-common
2.2.0
|
00001 #ifndef DUNE_BINARYFUNCTIONS_HH 00002 #define DUNE_BINARYFUNCTIONS_HH 00003 00008 #include<functional> 00009 #include<algorithm> 00010 00011 namespace Dune 00012 { 00013 template<typename Type> 00014 struct Min 00015 : std::binary_function<Type,Type,Type> 00016 { 00017 Type operator()(const Type& t1, const Type& t2) const 00018 { 00019 return std::min(t1,t2); 00020 } 00021 }; 00022 00023 template<typename Type> 00024 struct Max 00025 : std::binary_function<Type,Type,Type> 00026 { 00027 Type operator()(const Type& t1, const Type& t2) const 00028 { 00029 return std::max(t1,t2); 00030 } 00031 }; 00032 } 00033 00034 #endif