Engauge Digitizer  2
TestSpline.h
1 #ifndef TEST_SPLINE_H
2 #define TEST_SPLINE_H
3 
4 #include <QObject>
5 #include <QString>
6 #include "SplinePair.h"
7 #include <vector>
8 
9 class Spline;
10 
12 class TestSpline : public QObject
13 {
14  Q_OBJECT
15 public:
17  explicit TestSpline(QObject *parent = 0);
18 
19 signals:
20 
21 private slots:
22  void cleanupTestCase ();
23  void initTestCase ();
24 
25  void testCoefficientsFromOrdinals ();
26  void testSharpTransition ();
27  void testSplinesAsControlPoints ();
28 
29 private:
30  bool coefCheckX (const std::vector<double> &t,
31  const std::vector<SplinePair> &xy,
32  const Spline &s) const;
33  bool coefCheckY (const std::vector<double> &t,
34  const std::vector<SplinePair> &xy,
35  const Spline &s) const;
36  void coefShow (const QString &leftHandSide,
37  const QString &independentVariable,
38  double tLow,
39  double tHigh,
40  double a,
41  double b,
42  double c,
43  double d) const;
44 };
45 
46 #endif // TEST_SPLINE_H
Cubic interpolation given independent and dependent value vectors.
Definition: Spline.h:29
TestSpline(QObject *parent=0)
Single constructor.
Definition: TestSpline.cpp:24
Unit test of spline library.
Definition: TestSpline.h:12