00001 #ifndef SPLINE_DATAPOINT_HH 00002 #define SPLINE_DATAPOINT_HH 00003 00004 #include <vector> 00005 00006 namespace Spline{ 00007 00008 using std::vector; 00009 00011 class Point{ 00012 public: 00013 Point(double x, double y): m_x(x), m_y(y){} 00014 00015 double x()const{return m_x;} 00016 double y()const{return m_y;} 00017 00018 private: 00019 00020 double m_x; 00021 double m_y; 00022 }; 00023 00025 class DataPoint: public Point{ 00026 public: 00027 DataPoint(double x, double y, double er): Point(x, y), m_err(er) 00028 {} 00029 00030 double error()const{return m_err;} 00031 00032 private: 00033 00034 double m_err; 00035 00036 }; 00038 00039 typedef vector<Point> PointSet; 00040 typedef vector<DataPoint> DataSet; 00041 } 00042 00043 #endif