3
|
1 // NLConst.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_NLConst_h) |
|
25 #define octave_NLConst_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
465
|
31 class ColumnVector; |
|
32 |
238
|
33 #include "Bounds.h" |
3
|
34 #include "NLFunc.h" |
|
35 |
|
36 class NLConst : public Bounds, public NLFunc |
|
37 { |
|
38 public: |
|
39 |
1528
|
40 NLConst (void) : Bounds (), NLFunc () { } |
|
41 |
|
42 NLConst (int n) : Bounds (n), NLFunc () { } |
|
43 |
|
44 NLConst (const ColumnVector& lb, const NLFunc f, const ColumnVector& ub) |
|
45 : Bounds (lb, ub), NLFunc (f) { } |
|
46 |
|
47 NLConst (const NLConst& a) : Bounds (a.lb, a.ub), NLFunc (a.fun, a.jac) { } |
3
|
48 |
1528
|
49 NLConst& operator = (const NLConst& a) |
|
50 { |
|
51 nb = a.nb; |
|
52 lb = a.lb; |
|
53 fun = a.fun; |
|
54 jac = a.jac; |
|
55 ub = a.ub; |
|
56 |
|
57 return *this; |
|
58 } |
3
|
59 |
|
60 private: |
|
61 |
|
62 void error (const char *msg); |
|
63 |
|
64 }; |
|
65 |
|
66 #endif |
|
67 |
|
68 /* |
|
69 ;;; Local Variables: *** |
|
70 ;;; mode: C++ *** |
|
71 ;;; page-delimiter: "^/\\*" *** |
|
72 ;;; End: *** |
|
73 */ |