3
|
1 // DAEFunc.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 |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
238
|
24 #ifdef HAVE_CONFIG_H |
1192
|
25 #include <config.h> |
3
|
26 #endif |
|
27 |
|
28 #include "DAEFunc.h" |
|
29 |
|
30 DAEFunc::DAEFunc (void) |
|
31 { |
465
|
32 fun = 0; |
|
33 jac = 0; |
3
|
34 } |
|
35 |
|
36 DAEFunc::DAEFunc (DAERHSFunc f) |
|
37 { |
|
38 fun = f; |
465
|
39 jac = 0; |
3
|
40 } |
|
41 |
|
42 DAEFunc::DAEFunc (DAERHSFunc f, DAEJacFunc j) |
|
43 { |
|
44 fun = f; |
|
45 jac = j; |
|
46 } |
|
47 |
|
48 DAEFunc::DAEFunc (const DAEFunc& a) |
|
49 { |
|
50 fun = a.fun; |
|
51 jac = a.jac; |
|
52 } |
|
53 |
|
54 DAEFunc& |
|
55 DAEFunc::operator = (const DAEFunc& a) |
|
56 { |
|
57 fun = a.fun; |
|
58 jac = a.jac; |
|
59 |
|
60 return *this; |
|
61 } |
|
62 |
532
|
63 DAEFunc::DAERHSFunc |
3
|
64 DAEFunc::function (void) const |
|
65 { |
|
66 return fun; |
|
67 } |
|
68 |
|
69 DAEFunc& |
|
70 DAEFunc::set_function (DAERHSFunc f) |
|
71 { |
|
72 fun = f; |
|
73 return *this; |
|
74 } |
|
75 |
532
|
76 DAEFunc::DAEJacFunc |
3
|
77 DAEFunc::jacobian_function (void) const |
|
78 { |
|
79 return jac; |
|
80 } |
|
81 |
|
82 DAEFunc& |
|
83 DAEFunc::set_jacobian_function (DAEJacFunc j) |
|
84 { |
|
85 jac = j; |
|
86 return *this; |
|
87 } |
|
88 |