3
|
1 // ODEFunc.cc -*- 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 |
1296
|
24 #if defined (__GNUG__) |
|
25 #pragma implementation |
|
26 #endif |
|
27 |
238
|
28 #ifdef HAVE_CONFIG_H |
1192
|
29 #include <config.h> |
3
|
30 #endif |
|
31 |
|
32 #include "ODEFunc.h" |
|
33 |
|
34 ODEFunc::ODEFunc (void) |
|
35 { |
465
|
36 fun = 0; |
|
37 jac = 0; |
3
|
38 } |
|
39 |
|
40 ODEFunc::ODEFunc (ODERHSFunc f) |
|
41 { |
|
42 fun = f; |
465
|
43 jac = 0; |
3
|
44 } |
|
45 |
|
46 ODEFunc::ODEFunc (ODERHSFunc f, ODEJacFunc j) |
|
47 { |
|
48 fun = f; |
|
49 jac = j; |
|
50 } |
|
51 |
|
52 ODEFunc::ODEFunc (const ODEFunc& a) |
|
53 { |
|
54 fun = a.function (); |
|
55 jac = a.jacobian_function (); |
|
56 } |
|
57 |
|
58 ODEFunc& |
|
59 ODEFunc::operator = (const ODEFunc& a) |
|
60 { |
|
61 fun = a.function (); |
|
62 jac = a.jacobian_function (); |
|
63 |
|
64 return *this; |
|
65 } |
|
66 |
532
|
67 ODEFunc::ODERHSFunc |
3
|
68 ODEFunc::function (void) const |
|
69 { |
|
70 return fun; |
|
71 } |
|
72 |
|
73 ODEFunc& |
|
74 ODEFunc::set_function (ODERHSFunc f) |
|
75 { |
|
76 fun = f; |
|
77 return *this; |
|
78 } |
|
79 |
532
|
80 ODEFunc::ODEJacFunc |
3
|
81 ODEFunc::jacobian_function (void) const |
|
82 { |
|
83 return jac; |
|
84 } |
|
85 |
|
86 ODEFunc& |
|
87 ODEFunc::set_jacobian_function (ODEJacFunc j) |
|
88 { |
|
89 jac = j; |
|
90 return *this; |
|
91 } |
|
92 |
|
93 /* |
|
94 ;;; Local Variables: *** |
|
95 ;;; mode: C++ *** |
|
96 ;;; page-delimiter: "^/\\*" *** |
|
97 ;;; End: *** |
|
98 */ |