メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

ODES.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 2002 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 2, or (at your option) any
00010 later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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   // State vector time derivatives.
00077   ColumnVector xdot;
00078 
00079   // Parameter vector.
00080   ColumnVector theta;
00081 };
00082 
00083 #endif
00084 
00085 /*
00086 ;;; Local Variables: ***
00087 ;;; mode: C++ ***
00088 ;;; End: ***
00089 */

Wed Dec 29 11:52:14 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送