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

DASRT.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_DASRT_h)
00024 #define octave_DASRT_h 1
00025 
00026 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029 
00030 #include <cfloat>
00031 #include <cmath>
00032 
00033 #include "DASRT-opts.h"
00034 
00035 class
00036 DASRT_result
00037 {
00038 public:
00039 
00040   DASRT_result (void) { }
00041 
00042   DASRT_result (const Matrix& xx, const Matrix& xxdot, const ColumnVector& tt)
00043     : x (xx), xdot (xxdot), t (tt) { }
00044 
00045   DASRT_result (const DASRT_result& r)
00046     : x (r.x), xdot (r.xdot), t (r.t) { }
00047 
00048   DASRT_result& operator = (const DASRT_result& r)
00049     {
00050       if (this != &r)
00051         {
00052           x = r.x;
00053           xdot = r.xdot;
00054           t = r.t;
00055         }
00056       return *this;
00057     }
00058 
00059   ~DASRT_result (void) { }
00060 
00061   Matrix state (void) const { return x; }
00062   Matrix deriv (void) const { return xdot; }
00063   ColumnVector times (void) const { return t; }
00064 
00065 private:
00066 
00067   Matrix x;
00068   Matrix xdot;
00069   ColumnVector t;
00070 };
00071 
00072 class
00073 DASRT : public DAERT, public DASRT_options
00074 {
00075 public:
00076 
00077   DASRT (void) : DAERT (), DASRT_options (), initialized (false) { }
00078 
00079   DASRT (const ColumnVector& s, double tm, DAERTFunc& f)
00080     : DAERT (s, tm, f), DASRT_options (), initialized (false) { }
00081 
00082   DASRT (const ColumnVector& s, const ColumnVector& deriv,
00083          double tm, DAERTFunc& f)
00084     : DAERT (s, deriv, tm, f), DASRT_options (), initialized (false) { }
00085 
00086   ~DASRT (void) { }
00087 
00088   DASRT_result integrate (const ColumnVector& tout);
00089 
00090   DASRT_result integrate (const ColumnVector& tout,
00091                           const ColumnVector& tcrit); 
00092 
00093   std::string error_message (void) const;
00094 
00095 private:
00096 
00097   bool initialized;
00098 
00099   int liw;  
00100   int lrw;
00101 
00102   int ng;
00103 
00104   Array<int> info;
00105   Array<int> iwork;
00106   Array<int> jroot;
00107 
00108   Array<double> rwork;
00109 
00110   Array<double> abs_tol;
00111   Array<double> rel_tol;
00112 
00113   double *px;
00114   double *pxdot;
00115   double *pabs_tol;
00116   double *prel_tol;
00117   int *pinfo;
00118   int *piwork;
00119   double *prwork;
00120   int *pjroot;
00121 
00122   void integrate (double t);
00123 };
00124 
00125 #endif
00126 
00127 /*
00128 ;;; Local Variables: ***
00129 ;;; mode: C++ ***
00130 ;;; End: ***
00131 */

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