3
|
1 // ODEFunc.h -*- C++ -*- |
|
2 /* |
|
3 |
382
|
4 Copyright (C) 1992, 1993, 1994 John W. Eaton |
3
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
382
|
24 #if !defined (octave_ODEFunc_h) |
|
25 #define octave_ODEFunc_h 1 |
|
26 |
384
|
27 #include "Matrix.h" |
3
|
28 |
384
|
29 extern "C++" { |
3
|
30 |
|
31 #ifndef Vector |
|
32 #define Vector ColumnVector |
|
33 #endif |
|
34 |
|
35 #ifndef _ODEFunc_typedefs |
|
36 #define _ODEFunc_typedefs 1 |
|
37 |
|
38 typedef Vector (*ODERHSFunc) (const Vector&, double); |
|
39 typedef Matrix (*ODEJacFunc) (const Vector&, double); |
|
40 |
|
41 #endif |
|
42 |
|
43 class ODEFunc |
|
44 { |
|
45 public: |
|
46 |
|
47 ODEFunc (void); |
|
48 ODEFunc (ODERHSFunc f); |
|
49 ODEFunc (ODERHSFunc f, ODEJacFunc j); |
|
50 |
|
51 ODEFunc (const ODEFunc& a); |
|
52 |
|
53 ODEFunc& operator = (const ODEFunc& a); |
|
54 |
|
55 ODERHSFunc function (void) const; |
|
56 |
|
57 ODEFunc& set_function (ODERHSFunc f); |
|
58 |
|
59 ODEJacFunc jacobian_function (void) const; |
|
60 |
|
61 ODEFunc& set_jacobian_function (ODEJacFunc j); |
|
62 |
|
63 protected: |
|
64 |
|
65 ODERHSFunc fun; |
|
66 |
|
67 ODEJacFunc jac; |
382
|
68 }; |
3
|
69 |
382
|
70 } // extern "C++" |
3
|
71 |
|
72 #endif |
|
73 |
|
74 /* |
|
75 ;;; Local Variables: *** |
|
76 ;;; mode: C++ *** |
|
77 ;;; page-delimiter: "^/\\*" *** |
|
78 ;;; End: *** |
|
79 */ |