Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SplineCoeff Class Reference

Four element vector of a,b,c,d coefficients and the associated x value, for one interval of a set of piecewise-defined intervals. More...

#include <SplineCoeff.h>

Collaboration diagram for SplineCoeff:
Collaboration graph

Public Member Functions

 SplineCoeff (double t)
 Partial constructor for use mostly by container classes.
 
 SplineCoeff (double t, const SplinePair &a, const SplinePair &b, const SplinePair &c, const SplinePair &d)
 Full constructor.
 
bool operator< (const SplineCoeff &e) const
 Comparison operator for collection.
 
bool operator< (double t) const
 Comparison operator for collection.
 
SplinePair a () const
 Get method for a.
 
SplinePair b () const
 Get method for b.
 
SplinePair c () const
 Get method for c.
 
SplinePair d () const
 Get method for d.
 
SplinePair eval (double t) const
 Evaluate the value using the a,b,c,d coefficients, over this interval.
 
double t () const
 T value associated with these a,b,c,d coefficients.
 

Detailed Description

Four element vector of a,b,c,d coefficients and the associated x value, for one interval of a set of piecewise-defined intervals.

Definition at line 14 of file SplineCoeff.h.

Constructor & Destructor Documentation

◆ SplineCoeff() [1/2]

SplineCoeff::SplineCoeff ( double  t)

Partial constructor for use mostly by container classes.

◆ SplineCoeff() [2/2]

SplineCoeff::SplineCoeff ( double  t,
const SplinePair a,
const SplinePair b,
const SplinePair c,
const SplinePair d 
)

Full constructor.

Definition at line 7 of file SplineCoeff.cpp.

11 :
12 m_t(t),
13 m_a(a),
14 m_b(b),
15 m_c(c),
16 m_d(d)
17{
18}
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 b() const
Get method for b.
Definition: SplineCoeff.cpp:35
double t() const
T value associated with these a,b,c,d coefficients.
Definition: SplineCoeff.cpp:56

Member Function Documentation

◆ a()

SplinePair SplineCoeff::a ( ) const

Get method for a.

Definition at line 30 of file SplineCoeff.cpp.

31{
32 return m_a;
33}

◆ b()

SplinePair SplineCoeff::b ( ) const

Get method for b.

Definition at line 35 of file SplineCoeff.cpp.

36{
37 return m_b;
38}

◆ c()

SplinePair SplineCoeff::c ( ) const

Get method for c.

Definition at line 40 of file SplineCoeff.cpp.

41{
42 return m_c;
43}

◆ d()

SplinePair SplineCoeff::d ( ) const

Get method for d.

Definition at line 45 of file SplineCoeff.cpp.

46{
47 return m_d;
48}

◆ eval()

SplinePair SplineCoeff::eval ( double  t) const

Evaluate the value using the a,b,c,d coefficients, over this interval.

Definition at line 50 of file SplineCoeff.cpp.

51{
52 double deltat = t - m_t;
53 return m_a + m_b * deltat + m_c * (deltat * deltat) + m_d * (deltat * deltat * deltat);
54}

◆ operator<() [1/2]

bool SplineCoeff::operator< ( const SplineCoeff e) const

Comparison operator for collection.

Definition at line 20 of file SplineCoeff.cpp.

21{
22 return m_t < c.t();
23}

◆ operator<() [2/2]

bool SplineCoeff::operator< ( double  t) const

Comparison operator for collection.

Definition at line 25 of file SplineCoeff.cpp.

26{
27 return m_t < t;
28}

◆ t()

double SplineCoeff::t ( ) const

T value associated with these a,b,c,d coefficients.

Definition at line 56 of file SplineCoeff.cpp.

57{
58 return m_t;
59}

The documentation for this class was generated from the following files: