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