dune-common
2.6-git
dune
common
binaryfunctions.hh
Go to the documentation of this file.
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=4 sw=2 sts=2:
3
#ifndef DUNE_BINARYFUNCTIONS_HH
4
#define DUNE_BINARYFUNCTIONS_HH
5
10
#include <functional>
11
#include <algorithm>
12
13
namespace
Dune
14
{
15
template
<
typename
Type>
16
struct
Min
17
: std::binary_function<Type,Type,Type>
18
{
19
Type
operator()
(
const
Type& t1,
const
Type& t2)
const
20
{
21
return
std::min(t1,t2);
22
}
23
};
24
25
template
<
typename
Type>
26
struct
Max
27
: std::binary_function<Type,Type,Type>
28
{
29
Type
operator()
(
const
Type& t1,
const
Type& t2)
const
30
{
31
return
std::max(t1,t2);
32
}
33
};
34
}
35
36
#endif
Dune::Min
Definition:
binaryfunctions.hh:16
Dune
Dune namespace.
Definition:
alignedallocator.hh:9
Dune::Min::operator()
Type operator()(const Type &t1, const Type &t2) const
Definition:
binaryfunctions.hh:19
Dune::Max::operator()
Type operator()(const Type &t1, const Type &t2) const
Definition:
binaryfunctions.hh:29
Dune::Max
Definition:
binaryfunctions.hh:26
Generated by
1.8.17