00001
00002
00003 #ifndef SCALA_SPLINE
00004 #define SCALA_SPLINE
00005
00006 #include <vector>
00007 typedef std::pair<float,float> RPair;
00008
00009 namespace scala
00010 {
00011 class Spline
00012
00013 {
00014 public:
00015 Spline() : n(0) {}
00016
00017 Spline(const std::vector<RPair>& xyin);
00018
00019 float Interpolate(const float& xx) const;
00020
00021 private:
00022 int n;
00023 std::vector<double> x;
00024 std::vector<double> y;
00025 std::vector<double> y2;
00026
00027 };
00028 }
00029
00030 #endif