File indexing completed on 2026-06-02 08:48:23
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef CUBICSPLINE_H_
0009 #define CUBICSPLINE_H_
0010
0011 #include <iostream>
0012 #include <sstream>
0013 #include <vector>
0014 #include <cmath>
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 namespace NumA{
0026
0027 class CubicSpline{
0028
0029 public:
0030
0031 CubicSpline(std::vector<double> x, std::vector<double> y);
0032 virtual ~CubicSpline();
0033
0034 void ConstructSpline();
0035
0036 double getSplineInsideValue(double z);
0037
0038 private:
0039
0040 const unsigned int m_N ;
0041
0042 std::vector<double> m_X ;
0043 std::vector<double> m_Y ;
0044
0045 std::vector<double> m_aCoeff ;
0046 std::vector<double> m_bCoeff ;
0047 std::vector<double> m_cCoeff ;
0048 std::vector<double> m_dCoeff ;
0049
0050 bool m_SplineDefined ;
0051
0052 };
0053
0054
0055 }
0056
0057
0058 #endif