Commit 2477811d authored by Purves, Murray's avatar Purves, Murray
Browse files

Fixing typo in interpolateToOtherBaseValues and adding method documentation

parent 319395da
Pipeline #39579 passed with stages
in 14 minutes and 59 seconds
......@@ -22,7 +22,7 @@ template <typename T>
std::vector<T> RADIX_PUBLIC interpolateToOtherBaseValues(
const std::vector<T> &baseValues, const std::vector<T> &newBaseValues,
const std::vector<T> &valuesToInterpolate, const bool logarithmic = false,
const bool circular = false, const T missingValues = T(-9999));
const bool circular = false, const T missingValue = T(-9999));
} // namespace radix
......
......@@ -15,6 +15,8 @@ namespace radix
* to be present. Used for determining 'interpolation bounds' (there's
* definitely a better phrase for this)
* @param valuesToInterpolate The values to interpolate
* @param logarithmic Flag indicating whether to interpolate linearly with
* baseValues (false) or by their natural log (true)
* @param circular Flag indicating whether to use circular interpolation (for
* angles in degrees)
* @param missingValue The value which indicates that the value is missing
......@@ -140,18 +142,22 @@ std::vector<T> interpolateValues(const std::vector<T> &baseValues,
/**
* @brief interpolateToOtherBaseValues
* @param baseValues
* @param newBaseValues
* @param valuesToInterpolate
* @param circular
* @param missingValues
* @param baseValues Base vector for interpolation - requires all values
* to be present. Used for determining 'interpolation bounds'
* @param newBaseValues The new vector of base values to use
* @param valuesToInterpolate The values to interpolate to the new base values
* @param logarithmic Flag indicating whether to interpolate linearly with
* baseValues (false) or by their natural log (true)
* @param circular Flag indicating whether to use circular interpolation (for
* angles in degrees)
* @param missingValue The value which indicates that the value is missing
* @return
*/
template <typename T>
std::vector<T> interpolateToOtherBaseValues(
const std::vector<T> &baseValues, const std::vector<T> &newBaseValues,
const std::vector<T> &valuesToInterpolate, const bool logarithmic,
const bool circular, const T missingValues)
const bool circular, const T missingValue)
{
std::vector<T> finalInterpolatedValues(newBaseValues.size());
......@@ -160,7 +166,7 @@ std::vector<T> interpolateToOtherBaseValues(
// First interpolate across the existing data to ensure there are no missing
radix_line(" Initial interpolation to remove missing values in input data");
std::vector<T> initialInterpolatedValues = interpolateValues(
baseValues, valuesToInterpolate, logarithmic, circular, missingValues);
baseValues, valuesToInterpolate, logarithmic, circular, missingValue);
// If this fails, we have to fail this one too
if (initialInterpolatedValues.size() == 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment