00001
00002
00003
00004 #ifndef Table_h
00005 #define Table_h
00006
00007 #include <vector>
00008 using namespace std;
00009
00013 class Table
00014 {
00015 private:
00016 int ntab;
00017 int even_xx;
00018
00019 int Vlocate(double x, const vector<double>& xx);
00020 int Vlocate_with_guard(double x, const vector<double>& xx);
00021 double odd2(double, const vector<double>&, const vector<double>&, int e=0);
00022 double drv2(double, const vector<double>&, const vector<double>&, int e=0);
00023
00024 public:
00025
00027 static bool use_guard;
00028
00030 vector<double> xx;
00032 vector<double> yy;
00033
00035 Table(int n);
00036
00038
00040 double get_x(double y);
00042 double get_y(double x);
00044 double get_drv(double x);
00045
00046
00047
00049 void set_even(void) {even_xx=1;}
00050 };
00051
00052 #endif