NiHu  2.0
distance_kernel_intervals.hpp
Go to the documentation of this file.
1 // This file is a part of NiHu, a C++ BEM template library.
2 //
3 // Copyright (C) 2012-2014 Peter Fiala <fiala@hit.bme.hu>
4 // Copyright (C) 2012-2014 Peter Rucz <rucz@hit.bme.hu>
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
33 #ifndef DISTANCE_KERNEL_INTERVALS_HPP_INCLUDED
34 #define DISTANCE_KERNEL_INTERVALS_HPP_INCLUDED
35 
36 #include "../tmp/interval.hpp"
37 #include "../core/global_definitions.hpp"
38 
39 namespace NiHu
40 {
41 
50 template <class asymptotic, unsigned Accuracy = GLOBAL_ACCURACY>
52 
54 template <>
55 struct distance_kernel_interval<asymptotic::log<1>, 2>
56 {
57  typedef tmp::vector<
61  > type;
62 };
63 
64 
66 template <>
67 struct distance_kernel_interval<asymptotic::log<1>, 3>
68 {
69  typedef tmp::vector<
72  // break_point<std::ratio<51,10>, tmp::integer<int, 2> >,
74  > type;
75 };
76 
77 
79 template <>
80 struct distance_kernel_interval<asymptotic::inverse<1>, 2>
81 {
82  typedef tmp::vector<
86  > type;
87 };
88 
89 
91 template <>
92 struct distance_kernel_interval<asymptotic::inverse<2>, 2>
93 {
94  typedef tmp::vector<
99  > type;
100 };
101 
102 
104 template <>
105 struct distance_kernel_interval<asymptotic::inverse<3>, 2>
106 {
107  typedef tmp::vector<
113  > type;
114 };
115 
117 template <>
118 struct distance_kernel_interval<asymptotic::inverse<1>, 3>
119 {
120  typedef tmp::vector<
125  > type;
126 };
127 
129 template <>
130 struct distance_kernel_interval<asymptotic::inverse<2>, 3>
131 {
132  typedef tmp::vector<
138  > type;
139 };
140 
141 
143 template <>
144 struct distance_kernel_interval<asymptotic::inverse<3>, 3>
145 {
146  typedef tmp::vector<
154  > type;
155 };
156 
157 } // end of namespace NiHu
158 
159 #endif /* DISTANCE_KERNEL_INTERVALS_HPP_INCLUDED */
NiHu::distance_kernel_interval
define intervals for distance range and accuracy
Definition: distance_kernel_intervals.hpp:51
tmp::vector
Compile time vector with an arbitrary number of arguments.
Definition: vector.hpp:42
tmp::integer
integer type representation
Definition: integer.hpp:54
tmp::break_point
A break point consisting of a X and a Y value.
Definition: interval.hpp:57