Engauge Digitizer 2
Loading...
Searching...
No Matches
SplineCoeff.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef SPLINE_COEFF
8#define SPLINE_COEFF
9
10#include "SplinePair.h"
11
15{
16public:
18 SplineCoeff(double t);
19
21 SplineCoeff(double t,
22 const SplinePair &a,
23 const SplinePair &b,
24 const SplinePair &c,
25 const SplinePair &d);
26
28 bool operator<(const SplineCoeff &e) const;
29
31 bool operator<(double t) const;
32
34 SplinePair a () const;
35
37 SplinePair b () const;
38
40 SplinePair c () const;
41
43 SplinePair d () const;
44
46 SplinePair eval(double t) const;
47
49 double t () const;
50
51private:
53
54 double m_t;
55 SplinePair m_a;
56 SplinePair m_b;
57 SplinePair m_c;
58 SplinePair m_d;
59};
60
61#endif // SPLINE_COEFF
Four element vector of a,b,c,d coefficients and the associated x value, for one interval of a set of ...
Definition: SplineCoeff.h:15
SplinePair d() const
Get method for d.
Definition: SplineCoeff.cpp:45
SplinePair a() const
Get method for a.
Definition: SplineCoeff.cpp:30
SplinePair c() const
Get method for c.
Definition: SplineCoeff.cpp:40
SplinePair eval(double t) const
Evaluate the value using the a,b,c,d coefficients, over this interval.
Definition: SplineCoeff.cpp:50
SplinePair b() const
Get method for b.
Definition: SplineCoeff.cpp:35
SplineCoeff(double t)
Partial constructor for use mostly by container classes.
bool operator<(const SplineCoeff &e) const
Comparison operator for collection.
Definition: SplineCoeff.cpp:20
double t() const
T value associated with these a,b,c,d coefficients.
Definition: SplineCoeff.cpp:56
Single X/Y pair for cubic spline interpolation initialization and calculations.
Definition: SplinePair.h:14