3
|
1 // DAEFunc.h -*- C++ -*- |
|
2 /* |
|
3 |
1011
|
4 Copyright (C) 1992, 1993, 1994, 1995 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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
3
|
21 |
|
22 */ |
|
23 |
382
|
24 #if !defined (octave_DAEFunc_h) |
|
25 #define octave_DAEFunc_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
465
|
31 class Matrix; |
|
32 class ColumnVector; |
3
|
33 |
|
34 #ifndef Vector |
|
35 #define Vector ColumnVector |
|
36 #endif |
|
37 |
384
|
38 #if !defined (octave_DAEFunc_typedefs) |
|
39 #define octave_DAEFunc_typedefs 1 |
3
|
40 |
|
41 #endif |
|
42 |
|
43 class DAEFunc |
|
44 { |
|
45 public: |
|
46 |
532
|
47 struct DAEJac |
|
48 { |
|
49 Matrix *dfdxdot; |
|
50 Matrix *dfdx; |
|
51 }; |
|
52 |
|
53 typedef Vector (*DAERHSFunc) (const Vector& x, |
|
54 const Vector& xdot, double); |
|
55 |
|
56 typedef DAEJac (*DAEJacFunc) (const Vector& x, |
|
57 const Vector& xdot, double); |
|
58 |
3
|
59 DAEFunc (void); |
|
60 DAEFunc (DAERHSFunc f); |
|
61 DAEFunc (DAERHSFunc f, DAEJacFunc j); |
|
62 |
|
63 DAEFunc (const DAEFunc& a); |
|
64 |
|
65 DAEFunc& operator = (const DAEFunc& a); |
|
66 |
|
67 DAERHSFunc function (void) const; |
|
68 |
|
69 DAEFunc& set_function (DAERHSFunc f); |
|
70 |
|
71 DAEJacFunc jacobian_function (void) const; |
|
72 |
|
73 DAEFunc& set_jacobian_function (DAEJacFunc f); |
|
74 |
|
75 protected: |
|
76 |
|
77 DAERHSFunc fun; |
|
78 |
|
79 DAEJacFunc jac; |
|
80 }; |
|
81 |
|
82 #endif |
382
|
83 |
|
84 /* |
|
85 ;;; Local Variables: *** |
|
86 ;;; mode: C++ *** |
|
87 ;;; page-delimiter: "^/\\*" *** |
|
88 ;;; End: *** |
|
89 */ |