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