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>
51
struct
distance_kernel_interval
;
52
54
template
<>
55
struct
distance_kernel_interval
<asymptotic::log<1>, 2>
56
{
57
typedef
tmp::vector
<
58
tmp::break_point<std::ratio<13,10>
,
tmp::integer<int, 4>
>,
59
tmp::break_point<std::ratio<23,10>
,
tmp::integer<int, 2>
>,
60
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
61
>
type
;
62
};
63
64
66
template
<>
67
struct
distance_kernel_interval
<asymptotic::log<1>, 3>
68
{
69
typedef
tmp::vector
<
70
tmp::break_point<std::ratio<12,10>
,
tmp::integer<int, 8>
>,
71
tmp::break_point<std::ratio<17,10>
,
tmp::integer<int, 4>
>,
72
// break_point<std::ratio<51,10>, tmp::integer<int, 2> >,
73
tmp::break_point<tmp::ratio_infinite, 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
<
83
tmp::break_point<std::ratio<10,10>
,
tmp::integer<int, 4>
>,
84
tmp::break_point<std::ratio<28,10>
,
tmp::integer<int, 2>
>,
85
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
86
>
type
;
87
};
88
89
91
template
<>
92
struct
distance_kernel_interval
<asymptotic::inverse<2>, 2>
93
{
94
typedef
tmp::vector
<
95
tmp::break_point<std::ratio<10,10>
,
tmp::integer<int, 6>
>,
96
tmp::break_point<std::ratio<15,10>
,
tmp::integer<int, 4>
>,
97
tmp::break_point<std::ratio<50,10>
,
tmp::integer<int, 2>
>,
98
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
99
>
type
;
100
};
101
102
104
template
<>
105
struct
distance_kernel_interval
<asymptotic::inverse<3>, 2>
106
{
107
typedef
tmp::vector
<
108
tmp::break_point<std::ratio<10,10>
,
tmp::integer<int, 8>
>,
109
tmp::break_point<std::ratio<13,10>
,
tmp::integer<int, 6>
>,
110
tmp::break_point<std::ratio<20,10>
,
tmp::integer<int, 4>
>,
111
tmp::break_point<std::ratio<70,10>
,
tmp::integer<int, 2>
>,
112
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
113
>
type
;
114
};
115
117
template
<>
118
struct
distance_kernel_interval
<asymptotic::inverse<1>, 3>
119
{
120
typedef
tmp::vector
<
121
tmp::break_point<std::ratio<11,10>
,
tmp::integer<int, 6>
>,
122
tmp::break_point<std::ratio<18,10>
,
tmp::integer<int, 4>
>,
123
tmp::break_point<std::ratio<91,10>
,
tmp::integer<int, 2>
>,
124
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
125
>
type
;
126
};
127
129
template
<>
130
struct
distance_kernel_interval
<asymptotic::inverse<2>, 3>
131
{
132
typedef
tmp::vector
<
133
tmp::break_point<std::ratio< 11,10>
,
tmp::integer<int, 8>
>,
134
tmp::break_point<std::ratio< 15,10>
,
tmp::integer<int, 6>
>,
135
tmp::break_point<std::ratio< 28,10>
,
tmp::integer<int, 4>
>,
136
tmp::break_point<std::ratio<158,10>
,
tmp::integer<int, 2>
>,
137
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
138
>
type
;
139
};
140
141
143
template
<>
144
struct
distance_kernel_interval
<asymptotic::inverse<3>, 3>
145
{
146
typedef
tmp::vector
<
147
tmp::break_point<std::ratio< 10,10>
,
tmp::integer<int, 9>
>,
// should be 12
148
tmp::break_point<std::ratio< 11,10>
,
tmp::integer<int, 9>
>,
// should be 10
149
tmp::break_point<std::ratio< 14,10>
,
tmp::integer<int, 8>
>,
150
tmp::break_point<std::ratio< 19,10>
,
tmp::integer<int, 6>
>,
151
tmp::break_point<std::ratio< 36,10>
,
tmp::integer<int, 4>
>,
152
tmp::break_point<std::ratio<223,10>
,
tmp::integer<int, 2>
>,
153
tmp::break_point<tmp::ratio_infinite, tmp::integer<int, 0>
>
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
src
library
distance_kernel_intervals.hpp
Generated on Wed Jan 29 2025 01:00:12 for NiHu by
1.8.18