Loading [MathJax]/extensions/tex2jax.js
OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
LinearIntervalInterpolation.h
Go to the documentation of this file.
1
15
#pragma once
16
17
#include "
BaseLib/Error.h
"
18
19
namespace
MathLib
{
20
31
template
<
typename
NUMERIC_TYPE>
32
class
LinearIntervalInterpolation
{
33
public
:
43
LinearIntervalInterpolation
(NUMERIC_TYPE a, NUMERIC_TYPE b, NUMERIC_TYPE c, NUMERIC_TYPE d);
50
inline
NUMERIC_TYPE
operator()
(NUMERIC_TYPE x)
const
;
51
52
private
:
56
NUMERIC_TYPE
m_
;
60
NUMERIC_TYPE
n_
;
61
};
32
class
LinearIntervalInterpolation
{
…
};
62
63
template
<
typename
NUMERIC_TYPE>
64
LinearIntervalInterpolation<NUMERIC_TYPE>::LinearIntervalInterpolation
(
65
NUMERIC_TYPE a, NUMERIC_TYPE b, NUMERIC_TYPE c, NUMERIC_TYPE d)
66
: m_(d - c), n_(0.0)
67
{
68
if
(b == a) {
69
OGS_FATAL
(
"LinearIntervalInterpolation::LinearIntervalInterpolation: a == b, empty interval"
);
70
}
71
m_
/= (b - a);
72
n_
= c -
m_
* a;
73
}
64
LinearIntervalInterpolation<NUMERIC_TYPE>::LinearIntervalInterpolation
( {
…
}
74
75
template
<
typename
NUMERIC_TYPE>
76
inline
NUMERIC_TYPE
LinearIntervalInterpolation<NUMERIC_TYPE>::operator()
(NUMERIC_TYPE x)
const
77
{
78
return
m_ * x + n_;
79
}
76
inline
NUMERIC_TYPE
LinearIntervalInterpolation<NUMERIC_TYPE>::operator()
(NUMERIC_TYPE x)
const
{
…
}
80
81
}
// end namespace MathLib
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
MathLib::LinearIntervalInterpolation
Class (template) LinearIntervalInterpolation is a functional object performing an interval mapping .
Definition
LinearIntervalInterpolation.h:32
MathLib::LinearIntervalInterpolation::m_
NUMERIC_TYPE m_
Definition
LinearIntervalInterpolation.h:56
MathLib::LinearIntervalInterpolation::LinearIntervalInterpolation
LinearIntervalInterpolation(NUMERIC_TYPE a, NUMERIC_TYPE b, NUMERIC_TYPE c, NUMERIC_TYPE d)
Definition
LinearIntervalInterpolation.h:64
MathLib::LinearIntervalInterpolation::operator()
NUMERIC_TYPE operator()(NUMERIC_TYPE x) const
Definition
LinearIntervalInterpolation.h:76
MathLib::LinearIntervalInterpolation::n_
NUMERIC_TYPE n_
Definition
LinearIntervalInterpolation.h:60
MathLib
Definition
CreateComponent.h:32
MathLib
InterpolationAlgorithms
LinearIntervalInterpolation.h
Generated by
1.12.0