Dune Core Modules (2.6.0)

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
13namespace 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 namespace.
Definition: alignedallocator.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)