00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _TABLE_BASE_H
00011 #define _TABLE_BASE_H
00012
00018 class TableBase
00019 {
00020 public:
00021 TableBase();
00023
00025
00026 vector< double > getVec() const;
00027 void setVec( vector< double > val );
00028
00029 double getOutputValue() const;
00030 void setOutputValue( double val );
00031
00032 double getY( unsigned int index ) const;
00033
00035
00037 void linearTransform( double scale, double offset );
00038 void xplot( string file, string plotname );
00039 void plainPlot( string file );
00040 void loadXplot( string fname, string plotname );
00041 void loadXplotRange( string fname, string plotname,
00042 unsigned int start, unsigned int end );
00043 void loadCSV(
00044 string fname, int startLine, int colNum, char separator );
00045 void compareXplot( string fname, string plotname, string op );
00046 void compareVec( vector< double > other, string op );
00047 void clearVec();
00048
00050
00052 double* lookupVec( unsigned int index );
00053 void setVecSize( unsigned int num );
00054 unsigned int getVecSize( ) const;
00055 double interpolate( double x, double xmin, double xmax ) const;
00056
00057 static const Cinfo* initCinfo();
00058 protected:
00059 vector< double >& vec();
00060 private:
00061 double output_;
00062 vector< double > vec_;
00063 };
00064
00065 #endif // _TABLE_BASE_H