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