ProteoWizard
base.hpp
Go to the documentation of this file.
1//
2// $Id$
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
27namespace 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
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
Definition base.hpp:40