00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_ODES_h)
00024 #define octave_ODES_h 1
00025
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029
00030 #include "ODESFunc.h"
00031 #include "base-de.h"
00032
00033 class
00034 ODES : public base_diff_eqn, public ODESFunc
00035 {
00036 public:
00037
00038 ODES (void)
00039 : base_diff_eqn (), ODESFunc (), theta () { }
00040
00041 ODES (const ColumnVector& s, double tm, ODESFunc& f)
00042 : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0), theta () { }
00043
00044 ODES (const ColumnVector& s, const ColumnVector& xtheta, double tm,
00045 ODESFunc& f)
00046 : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0),
00047 theta (xtheta) { }
00048
00049 ODES (const ODES& a)
00050 : base_diff_eqn (a), ODESFunc (a), theta (a.theta) { }
00051
00052 ODES& operator = (const ODES& a)
00053 {
00054 if (this != &a)
00055 {
00056 base_diff_eqn::operator = (a);
00057 ODESFunc::operator = (a);
00058
00059 xdot = a.xdot;
00060 theta = a.theta;
00061 }
00062 return *this;
00063 }
00064
00065 ~ODES (void) { }
00066
00067 ColumnVector parameter_vector (void) { return theta; }
00068
00069 void initialize (const ColumnVector& x, double t);
00070
00071 void initialize (const ColumnVector& x, double t,
00072 const ColumnVector& theta);
00073
00074 protected:
00075
00076
00077 ColumnVector xdot;
00078
00079
00080 ColumnVector theta;
00081 };
00082
00083 #endif
00084
00085
00086
00087
00088
00089