Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
422ab48f
Commit
422ab48f
authored
Jan 10, 2019
by
Purves, Murray
Browse files
Removing some unneeded radix output
parent
2088c56e
Changes
1
Hide whitespace changes
Inline
Side-by-side
radixmath/interpolate.cc
View file @
422ab48f
...
...
@@ -39,35 +39,12 @@ std::vector<float> interpolateValues(
{
if
(
pressure
==
missingValue
)
{
radix_line
(
"Error! Base vector contains "
<<
missingValue
<<
" values - can't use to interpolate"
);
radix
(
" Base vector:"
);
for
(
float
p
:
baseValues
)
{
radix
(
" "
<<
p
<<
";"
);
}
radix_line
(
""
);
radix_line
(
"Error! Base vector contains missing ("
<<
missingValue
<<
") values - can't use to interpolate"
);
return
std
::
vector
<
float
>
();
}
}
// Write out initial values
radix_line
(
"Interpolating "
<<
valuesToInterpolate
.
size
()
<<
" values; initial:"
);
radix
(
" "
);
for
(
float
f
:
valuesToInterpolate
)
{
radix
(
f
<<
" "
);
}
radix_line
(
""
);
radix_line
(
"Base values:"
);
radix
(
" "
);
for
(
float
f
:
baseValues
)
{
radix
(
f
<<
" "
);
}
radix_line
(
""
);
// Loop through vector first to find first/last non-missing indices
size_t
firstIndex
=
valuesToInterpolate
.
size
(),
lastIndex
=
0
;
bool
foundFirst
=
false
;
...
...
@@ -143,15 +120,7 @@ std::vector<float> interpolateValues(
}
}
}
// Write out final values
radix_line
(
"Interpolation complete. Final values:"
);
radix
(
" "
);
for
(
float
f
:
interpolatedValues
)
{
radix
(
f
<<
" "
);
}
radix_line
(
""
);
radix_line
(
"Interpolation complete"
);
return
interpolatedValues
;
}
...
...
@@ -174,12 +143,6 @@ std::vector<float> interpolateToOtherBaseValues(
std
::
vector
<
float
>
finalInterpolatedValues
(
newBaseValues
.
size
());
radix_line
(
"Interpolating values to new base values"
);
radix
(
" Initial base values: "
);
radix_block
(
for
(
float
f
:
baseValues
)
{
radix
(
f
<<
" "
);
});
radix_line
(
""
);
radix
(
" Initial interp values: "
);
radix_block
(
for
(
float
f
:
valuesToInterpolate
)
{
radix
(
f
<<
" "
);
});
radix_line
(
""
);
// First interpolate across the existing data to ensure there are no missing
radix_line
(
" Initial interpolation to remove missing values in input data"
);
...
...
@@ -259,14 +222,7 @@ std::vector<float> interpolateToOtherBaseValues(
}
}
}
radix_line
(
"Interpolation to new base values complete"
);
radix
(
" Final base values: "
);
radix_block
(
for
(
float
f
:
newBaseValues
)
{
radix
(
f
<<
" "
);
});
radix_line
(
""
);
radix
(
" Final interp values: "
);
radix_block
(
for
(
float
f
:
finalInterpolatedValues
)
{
radix
(
f
<<
" "
);
});
radix_line
(
""
);
return
finalInterpolatedValues
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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