CAkimaInterpolator.h
Go to the documentation of this file.
1 #ifndef imath_CAkimaInterpolator_included
2 #define imath_CAkimaInterpolator_included
3 
4 
5 // Qt includes
6 #include <QtCore/QMap>
7 
8 // ACF includes
9 #include <imath/TIMathFunction.h>
10 
11 
12 namespace imath
13 {
14 
15 
19 class CAkimaInterpolator: public virtual IDoubleFunction
20 {
21 public:
22  struct Node
23  {
24  double value;
25  double derivative;
26  };
27 
28  typedef QMap<double, Node> Nodes;
29 
31  CAkimaInterpolator(double* positions, double* values, int nodesCount);
32 
33  void SetNodes(double* positions, double* values, int nodesCount);
34 
35  // reimplemented (imath::TIMathFunction<double, double>)
36  virtual bool GetValueAt(const double& argument, double& result) const;
37  virtual double GetValueAt(const double& argument) const;
38 
39 protected:
41 };
42 
43 
44 } // namespace imath
45 
46 
47 #endif // !imath_CAkimaInterpolator_included
48 
49 
1D interpolation using Akima method.
virtual bool GetValueAt(const double &argument, double &result) const
QMap< double, Node > Nodes
void SetNodes(double *positions, double *values, int nodesCount)
Template interface for any mathematical function.

© 2007-2017 Witold Gantzke and Kirill Lepskiy