From: <mk...@us...> - 2003-07-18 10:14:51
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData In directory sc8-pr-cvs1:/tmp/cvs-serv15388/Include/SimData Modified Files: LUT.h Pack.h TypeAdapter.h Log Message: see CHANGES.current Index: LUT.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/LUT.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LUT.h 17 Jul 2003 10:12:40 -0000 1.2 --- LUT.h 18 Jul 2003 10:14:48 -0000 1.3 *************** *** 29,45 **** * Interpolated lookup tables of arbitrary dimension. * ! * TODO ! * this code is still in the form of a .cpp file used ! * during testing/development ! * ! * need to integrate with simdata: ! * inherit from basetype ! * implement pack/unpack/asString, etc. ! * (see the original simdata::Curve and simdata::Table [...1049 lines suppressed...] - - /* - simdata::Table3 t3; - t0 = simdata::SimDate::getSystemTime(); - // XXX must set data before interpolating - t3.interpolate(simdata::Table3::Dim(100)(40)(20), simdata::Interpolation::SPLINE); - t1 = simdata::SimDate::getSystemTime(); - std::cout << (t1-t0) << " s\n"; - */ - } - - int main() try { - test(); - return 0; - } catch(...) { } - - #endif #endif // __SIMDATA_LUT_H__ --- 667,670 ---- Index: Pack.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Pack.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Pack.h 17 Jul 2003 10:12:40 -0000 1.8 --- Pack.h 18 Jul 2003 10:14:48 -0000 1.9 *************** *** 297,300 **** --- 297,306 ---- def unpack_Curve(self): return self.unpack_basetype(Curve()) + def unpack_Table1(self): + return self.unpack_basetype(Table1()) + def unpack_Table2(self): + return self.unpack_basetype(Table2()) + def unpack_Table3(self): + return self.unpack_basetype(Table3()) def unpack_Path(self): return self.unpack_basetype(Path()) Index: TypeAdapter.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/TypeAdapter.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TypeAdapter.h 17 Jul 2003 10:12:40 -0000 1.14 --- TypeAdapter.h 18 Jul 2003 10:14:48 -0000 1.15 *************** *** 63,66 **** --- 63,72 ---- class Object; + template <int N, typename X> + class LUT; + + typedef LUT<1,float> Table1; + typedef LUT<2,float> Table2; + typedef LUT<3,float> Table3; SIMDATA_EXCEPTION(TypeMismatch) *************** *** 203,206 **** --- 209,215 ---- inline void set(Curve & x) const { setBase(x); } inline void set(Table & x) const { setBase(x); } + inline void set(Table1 & x) const { setBase(x); } + inline void set(Table2 & x) const { setBase(x); } + inline void set(Table3 & x) const { setBase(x); } inline void set(External & x) const { setBase(x); } inline void set(Key & x) const { setBase(x); } |