Go to the documentation of this file.
38 Spline(
const std::vector<double> &t,
39 const std::vector<SplinePair> &xy,
53 double &aUntranslated,
54 double &bUntranslated,
55 double &cUntranslated,
56 double &dUntranslated)
const;
61 int numIterations)
const;
83 void checkTIncrements (
const std::vector<double> &t)
const;
85 void computeCoefficientsForIntervals (
const std::vector<double> &t,
86 const std::vector<SplinePair> &xy);
87 void computeControlPointsForIntervals ();
90 std::vector<SplineCoeff> m_elements;
93 std::vector<double> m_t;
96 std::vector<SplinePair> m_xy;
99 std::vector<SplinePair> m_p1;
100 std::vector<SplinePair> m_p2;
SplinePair findSplinePairForFunctionX(double x, int numIterations) const
Use bisection algorithm to iteratively find the SplinePair interpolated to best match the specified x...
void computeUntranslatedCoefficients(double aTranslated, double bTranslated, double cTranslated, double dTranslated, double tI, double &aUntranslated, double &bUntranslated, double &cUntranslated, double &dUntranslated) const
From coefficients in xy=d*(t-ti)^3+c*(t-ti)^2+b*(t-ti)+a we compute and return the coefficients in xy...
Cubic interpolation given independent and dependent value vectors.
Single X/Y pair for cubic spline interpolation initialization and calculations.
SplinePair interpolateControlPoints(double t) const
Return interpolated y for specified x, for testing.
Unit test of spline library.
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].
SplinePair interpolateCoeff(double t) const
Return interpolated y for specified x.
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].