Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
e36efd67
Commit
e36efd67
authored
Nov 14, 2017
by
thomas.forbriger
Browse files
libtsxx [WP]: adjust debug output of linear interpolator
parent
7925ead4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/libtsxx/ipolin.cc
View file @
e36efd67
...
...
@@ -36,6 +36,7 @@
#include<iostream>
#include <tsxx/ipolin.h>
#include <tsxx/debug.h>
namespace
ts
{
...
...
@@ -78,19 +79,19 @@ namespace ts {
"requested sample lies outside time series"
);
aff
::
Tsubscript
iright
=
(
ileft
<
s
.
l
())
?
ileft
+
1
:
ileft
;
double
f
=
libtime
::
time2double
(
t
-
sff
::
wid2isample
(
hd
,
ileft
))
/
hd
.
dt
;
if
(
this
->
debug
()
)
{
std
::
cout
<<
"DEBUG: LinearInterpolator::operator():"
<<
std
::
endl
;
std
::
cout
<<
TF_IPOLIN_CC_VERSION
<<
std
::
endl
;
std
::
cout
<<
" ileft: "
<<
ileft
<<
std
::
endl
<<
" iright: "
<<
iright
<<
std
::
endl
<<
" tleft: "
<<
sff
::
wid2isample
(
hd
,
ileft
).
timestring
()
<<
std
::
endl
<<
" tright: "
<<
sff
::
wid2isample
(
hd
,
iright
).
timestring
()
<<
std
::
endl
<<
" t: "
<<
t
.
timestring
()
<<
std
::
endl
<<
" f: "
<<
f
<<
std
::
endl
;
}
TSXX_debug
(
this
->
debug
()
,
"LinearInterpolator::operator():"
,
TSXX_value
(
ileft
)
<<
" "
<<
TSXX_value
(
iright
)
<<
" "
<<
TSXX_value
(
f
)
<<
" "
<<
TSXX_value
(
hd
.
dt
)
<<
std
::
endl
<<
" "
<<
TSXX_value
(
Mdt
.
timestring
())
<<
std
::
endl
<<
"
"
<<
TSXX_value
(
sff
::
wid2isample
(
hd
,
ileft
).
timestring
())
<<
std
::
endl
<<
" "
<<
TSXX_value
(
t
.
timestring
())
<<
std
::
endl
<<
" "
<<
TSXX_value
(
sff
::
wid2isample
(
hd
,
iright
).
timestring
())
);
Tvalue
retval
=
((
1.
-
f
)
*
s
(
ileft
)
+
f
*
s
(
iright
));
return
(
retval
);
}
...
...
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