1 #include "SplineCoeff.h"
2 #include "SplinePair.h"
21 Spline(
const std::vector<double> &t,
22 const std::vector<SplinePair> &xy);
29 int numIterations)
const;
51 void checkTIncrements (
const std::vector<double> &t)
const;
53 void computeCoefficientsForIntervals (
const std::vector<double> &t,
54 const std::vector<SplinePair> &xy);
55 void computeControlPointsForIntervals ();
58 std::vector<SplineCoeff> m_elements;
61 std::vector<double> m_t;
64 std::vector<SplinePair> m_xy;
67 std::vector<SplinePair> m_p1;
68 std::vector<SplinePair> m_p2;
SplinePair interpolateCoeff(double t) const
Return interpolated y for specified x.
SplinePair interpolateControlPoints(double t) const
Return interpolated y for specified x, for testing.
Cubic interpolation given independent and dependent value vectors.
SplinePair p1(unsigned int i) const
Bezier p1 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
SplinePair findSplinePairForFunctionX(double x, int numIterations) const
Use bisection algorithm to iteratively find the SplinePair interpolated to best match the specified x...
SplinePair p2(unsigned int i) const
Bezier p2 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
Single X/Y pair for cubic spline interpolation initialization and calculations.