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

NLFunc.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 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_NLFunc_h)
00024 #define octave_NLFunc_h 1
00025 
00026 class ColumnVector;
00027 class Matrix;
00028 
00029 class
00030 NLFunc
00031 {
00032 public:
00033 
00034   typedef ColumnVector (*nonlinear_fcn) (const ColumnVector&);
00035   typedef Matrix (*jacobian_fcn) (const ColumnVector&);
00036 
00037   NLFunc (void)
00038     : fun (0), jac (0) { }
00039 
00040   NLFunc (const nonlinear_fcn f)
00041     : fun (f), jac (0) { }
00042 
00043   NLFunc (const nonlinear_fcn f, const jacobian_fcn j)
00044     : fun (f), jac (j) { }
00045 
00046   NLFunc (const NLFunc& a)
00047     : fun (a.fun), jac (a.jac) { }
00048 
00049   NLFunc& operator = (const NLFunc& a)
00050     {
00051       if (this != &a)
00052         {
00053           fun = a.fun;
00054           jac = a.jac;
00055         }
00056       return *this;
00057     }
00058 
00059   ~NLFunc (void) { }
00060 
00061   nonlinear_fcn function (void) const { return fun; }
00062 
00063   NLFunc& set_function (const nonlinear_fcn f)
00064     {
00065       fun = f;
00066       return *this;
00067     }
00068 
00069   jacobian_fcn jacobian_function (void) const { return jac; }
00070 
00071   NLFunc& set_jacobian_function (const jacobian_fcn j)
00072     {
00073       jac = j;
00074       return *this;
00075     }
00076 
00077 protected:
00078 
00079   nonlinear_fcn fun;
00080   jacobian_fcn jac;
00081 };
00082 
00083 #endif
00084 
00085 /*
00086 ;;; Local Variables: ***
00087 ;;; mode: C++ ***
00088 ;;; End: ***
00089 */

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