Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _REFVAL_JS_H_
00019 #define _REFVAL_JS_H_
00020
00021 #include <vector>
00022
00023
00024 class RefVal_JS
00025 {
00026 public:
00027 virtual std::vector<double> r(double s) const=0;
00028 virtual double s(double t) const=0;
00029 virtual std::vector<double> r_t(double t) const { return r( s(t) ); }
00030
00031 virtual std::vector<double> dr_ds(double s) const=0;
00032 virtual double ds_dt(double t) const=0;
00033 virtual std::vector<double> dr_dt(double t) const
00034 {
00035 std::vector<double> dr;
00036 dr.resize(dr_ds(t).size());
00037 for(unsigned int i = 0; i < dr_ds(t).size(); i++)
00038 dr.at(i) = dr_ds( s(t) ).at(i) * ds_dt( t );
00039 return dr;
00040 }
00041
00042 virtual std::vector<double> getLast() const { return r_t( getTotalTime() ); }
00043
00044 virtual double getTotalTime() const=0;
00045 };
00046
00047 #endif
00048