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 |
465
|
27 class Matrix; |
|
28 class ColumnVector; |
3
|
29 |
384
|
30 extern "C++" { |
3
|
31 |
|
32 #ifndef Vector |
|
33 #define Vector ColumnVector |
|
34 #endif |
|
35 |
|
36 class ODEFunc |
|
37 { |
|
38 public: |
|
39 |
532
|
40 typedef Vector (*ODERHSFunc) (const Vector&, double); |
|
41 typedef Matrix (*ODEJacFunc) (const Vector&, double); |
|
42 |
3
|
43 ODEFunc (void); |
|
44 ODEFunc (ODERHSFunc f); |
|
45 ODEFunc (ODERHSFunc f, ODEJacFunc j); |
|
46 |
|
47 ODEFunc (const ODEFunc& a); |
|
48 |
|
49 ODEFunc& operator = (const ODEFunc& a); |
|
50 |
|
51 ODERHSFunc function (void) const; |
|
52 |
|
53 ODEFunc& set_function (ODERHSFunc f); |
|
54 |
|
55 ODEJacFunc jacobian_function (void) const; |
|
56 |
|
57 ODEFunc& set_jacobian_function (ODEJacFunc j); |
|
58 |
|
59 protected: |
|
60 |
|
61 ODERHSFunc fun; |
|
62 |
|
63 ODEJacFunc jac; |
382
|
64 }; |
3
|
65 |
382
|
66 } // extern "C++" |
3
|
67 |
|
68 #endif |
|
69 |
|
70 /* |
|
71 ;;; Local Variables: *** |
|
72 ;;; mode: C++ *** |
|
73 ;;; page-delimiter: "^/\\*" *** |
|
74 ;;; End: *** |
|
75 */ |