Mercurial > hg > octave-lyh
comparison liboctave/DAERTFunc.h @ 3990:46388d6a4e44
[project @ 2002-07-16 06:20:39 by jwe]
author | jwe |
---|---|
date | Tue, 16 Jul 2002 06:20:40 +0000 |
parents | |
children | f23bc69132cc |
comparison
equal
deleted
inserted
replaced
3989:bdde4f33221e | 3990:46388d6a4e44 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 2002 John W. Eaton | |
4 | |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 2, or (at your option) any | |
10 later version. | |
11 | |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with Octave; see the file COPYING. If not, write to the Free | |
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
20 | |
21 */ | |
22 | |
23 #if !defined (octave_DAERTFunc_h) | |
24 #define octave_DAERTFunc_h 1 | |
25 | |
26 #include "dMatrix.h" | |
27 | |
28 class | |
29 DAERTFunc : DAEFunc | |
30 { | |
31 public: | |
32 | |
33 typedef ColumnVector (*DAERTConstrFunc) (const ColumnVector& x, double t); | |
34 | |
35 DAERTFunc (void) | |
36 : DAEFunc (), constr (0) { } | |
37 | |
38 DAERTFunc (DAERHSFunc f) | |
39 : DAEFunc (f), constr (0) { } | |
40 | |
41 DAERTFunc (DAERHSFunc f, DAEJacFunc j) | |
42 : DAEFunc (f, j), constr (0) { } | |
43 | |
44 DAERTFunc (DAERHSFunc f, DAERTConstrFunc cf) | |
45 : DAEFunc (f), constr (cf) { } | |
46 | |
47 DAERTFunc (DAERHSFunc f, DAERTConstrFunc cf, DAEJacFunc j) | |
48 : DAEFunc (f, j), constr (cf) { } | |
49 | |
50 DAERTFunc (const DAERTFunc& a) | |
51 : DAEFunc (a), constr (a.constr) { } | |
52 | |
53 DAERTFunc& operator = (const DAERTFunc& a) | |
54 { | |
55 if (this != &a) | |
56 { | |
57 DAEFunc::operator = (a); | |
58 constr = a.constr; | |
59 } | |
60 return *this; | |
61 } | |
62 | |
63 ~DAERTFunc (void) { } | |
64 | |
65 DAERTConstrFunc constraint_function (void) const { return constr; } | |
66 | |
67 DAERTFunc& set_constraint_function (DAERTConstrFunc cf) | |
68 { | |
69 constr = cf; | |
70 return *this; | |
71 } | |
72 | |
73 protected: | |
74 | |
75 DAERTConstrFunc constr; | |
76 }; | |
77 | |
78 #endif | |
79 | |
80 /* | |
81 ;;; Local Variables: *** | |
82 ;;; mode: C++ *** | |
83 ;;; End: *** | |
84 */ |