Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
2bfe8941
Commit
2bfe8941
authored
Mar 23, 2021
by
Steffen Schotthöfer
Browse files
Merge branch 'PN_CSD' of git.scc.kit.edu:rtsn/rtsn into PN_CSD
parents
5854e0cb
9bc446d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/src/toolboxes/interpolation.cpp
View file @
2bfe8941
...
@@ -63,7 +63,16 @@ double Interpolation::operator()( double x ) const {
...
@@ -63,7 +63,16 @@ double Interpolation::operator()( double x ) const {
Vector
::
ConstIterator
it
=
std
::
lower_bound
(
_x
.
begin
(),
_x
.
end
(),
x
);
Vector
::
ConstIterator
it
=
std
::
lower_bound
(
_x
.
begin
(),
_x
.
end
(),
x
);
// index of the lower bound to x in _x
// index of the lower bound to x in _x
unsigned
idx
=
static_cast
<
unsigned
>
(
std
::
max
(
int
(
it
-
_x
.
begin
()
)
-
1
,
0
)
);
unsigned
idx
=
0
;
if
(
x
>=
_x
[
0
]
&&
x
<=
_x
[
_x
.
size
()
-
1u
]
)
{
idx
=
static_cast
<
unsigned
>
(
std
::
max
(
int
(
it
-
_x
.
begin
()
)
-
1
,
0
)
);
}
else
if
(
x
<
_x
[
0
]
)
{
idx
=
0
;
}
else
if
(
x
>
_x
[
_x
.
size
()
-
1u
]
)
{
idx
=
_x
.
size
()
-
1u
;
}
// linear interpolation
// linear interpolation
if
(
_type
==
linear
||
_type
==
loglinear
)
{
if
(
_type
==
linear
||
_type
==
loglinear
)
{
...
...
jannick.wolters
@jm2154
mentioned in commit
ba0e8fb3
·
Apr 30, 2021
mentioned in commit
ba0e8fb3
mentioned in commit ba0e8fb30c16ad33ce30603bb179e887d05800d7
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment