ProteoWizard
pwiz
utility
findmf
base
base
utilities
base.hpp
Go to the documentation of this file.
1
//
2
// $Id: base.hpp 5313 2013-12-17 18:06:54Z chambm $
3
//
4
//
5
// Original author: Witold Wolski <wewolski@gmail.com>
6
//
7
// Copyright : ETH Zurich
8
//
9
// Licensed under the Apache License, Version 2.0 (the "License");
10
// you may not use this file except in compliance with the License.
11
// You may obtain a copy of the License at
12
//
13
// http://www.apache.org/licenses/LICENSE-2.0
14
//
15
// Unless required by applicable law or agreed to in writing, software
16
// distributed under the License is distributed on an "AS IS" BASIS,
17
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
// See the License for the specific language governing permissions and
19
// limitations under the License.
20
//
21
22
23
#ifndef BASEUTILITIES_H
24
#define BASEUTILITIES_H
25
26
27
namespace
ralab
28
{
29
namespace
base
30
{
31
namespace
base
32
{
33
namespace
utilities
34
{
35
// class generator:
36
template
<
typename
TReal>
37
struct
SeqPlus
{
38
TReal
m_from
;
39
TReal
m_by
;
40
41
SeqPlus
(TReal from)
42
: m_from(from), m_by(1)
43
{}
44
TReal
operator()
()
45
{
46
TReal current =
m_from
;
47
m_from +=
m_by
;
48
return
current;
49
}
50
};
51
52
template
<
typename
TReal>
53
struct
SeqMinus
{
54
TReal
m_from
;
55
TReal
m_by
;
56
57
SeqMinus
(TReal from)
58
: m_from(from), m_by(1)
59
{}
60
TReal
operator()
()
61
{
62
TReal current =
m_from
;
63
m_from -=
m_by
;
64
return
current;
65
}
66
};
67
}
68
}
//base
69
}
//base
70
}
//ralab
71
72
#endif // BASE_H
ralab::base::base::utilities::SeqMinus
Definition:
base.hpp:53
ralab::base::base::utilities::SeqPlus::operator()
TReal operator()()
Definition:
base.hpp:44
ralab::base::base::utilities::SeqMinus::m_from
TReal m_from
Definition:
base.hpp:54
ralab::base::base::utilities::SeqPlus::m_by
TReal m_by
Definition:
base.hpp:39
ralab::base::base::utilities::SeqPlus::SeqPlus
SeqPlus(TReal from)
Definition:
base.hpp:41
ralab::base::base::utilities::SeqPlus
Definition:
base.hpp:37
ralab::base::base::utilities::SeqPlus::m_from
TReal m_from
Definition:
base.hpp:38
ralab::base::base::utilities::SeqMinus::operator()
TReal operator()()
Definition:
base.hpp:60
ralab::base::base::utilities::SeqMinus::SeqMinus
SeqMinus(TReal from)
Definition:
base.hpp:57
ralab
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
Definition:
base.hpp:39
ralab::base::base::utilities::SeqMinus::m_by
TReal m_by
Definition:
base.hpp:55
Generated by
1.8.12