Skip to content

Commit

Permalink
add explanation to the function
Browse files Browse the repository at this point in the history
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 committed Feb 14, 2022
1 parent 0f42e6d commit d965378
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/interpolation/src/spline_interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ interpolation::MultiSplineCoef getSplineCoefficients(
return multi_spline_coef;
}

//!< @brief get values of spline interpolation on designated sampling points
// e.g. Assuming that query_keys are t vector for sampling, and multi_spline_coef is for x,
// meaning that spline interpolation was applied to x(t),
// return value will be x(t) vector
std::vector<double> getSplineInterpolatedValues(
const std::vector<double> & base_keys, const std::vector<double> & query_keys,
const interpolation::MultiSplineCoef & multi_spline_coef)
Expand All @@ -154,6 +158,10 @@ std::vector<double> getSplineInterpolatedValues(
return res;
}

//!< @brief get differential values of spline interpolation on designated sampling points
// e.g. Assuming that query_keys are t vector for sampling, and multi_spline_coef is for x,
// meaning that spline interpolation was applied to x(t),
// return value will be dx/dt(t) vector
std::vector<double> getSplineInterpolatedDiffValues(
const std::vector<double> & base_keys, const std::vector<double> & query_keys,
const interpolation::MultiSplineCoef & multi_spline_coef)
Expand Down

0 comments on commit d965378

Please sign in to comment.