3
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
3
|
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 |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
3
|
20 |
|
21 */ |
|
22 |
382
|
23 #if !defined (octave_NLP_h) |
|
24 #define octave_NLP_h 1 |
|
25 |
465
|
26 #include "dColVector.h" |
3
|
27 #include "Objective.h" |
|
28 #include "Bounds.h" |
|
29 #include "LinConst.h" |
|
30 #include "NLConst.h" |
1528
|
31 #include "base-min.h" |
3
|
32 |
1863
|
33 class |
|
34 NLP : public base_minimizer |
3
|
35 { |
1863
|
36 public: |
3
|
37 |
1863
|
38 NLP (void) |
|
39 : base_minimizer (), phi (), bnds (), lc (), nlc () { } |
3
|
40 |
1528
|
41 NLP (const ColumnVector& x, const Objective& obj) |
1863
|
42 : base_minimizer (x), phi (obj), bnds (), lc (), nlc () { } |
3
|
43 |
1528
|
44 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b) |
1863
|
45 : base_minimizer (x), phi (obj), bnds (b), lc (), nlc () { } |
3
|
46 |
1528
|
47 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
48 const LinConst& l) |
1863
|
49 : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc () { } |
3
|
50 |
1528
|
51 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
52 const LinConst& l, const NLConst& nl) |
|
53 : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc (nl) { } |
3
|
54 |
1528
|
55 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l) |
1863
|
56 : base_minimizer (x), phi (obj), bnds (), lc (l), nlc () { } |
1528
|
57 |
|
58 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l, |
|
59 const NLConst& nl) |
1863
|
60 : base_minimizer (x), phi (obj), bnds (), lc (l), nlc (nl) { } |
3
|
61 |
1528
|
62 NLP (const ColumnVector& x, const Objective& obj, const NLConst& nl) |
1863
|
63 : base_minimizer (x), phi (obj), bnds (), lc (), nlc (nl) { } |
3
|
64 |
1528
|
65 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
66 const NLConst& nl) |
1863
|
67 : base_minimizer (x), phi (obj), bnds (b), lc (), nlc (nl) { } |
3
|
68 |
1835
|
69 NLP (const NLP& a) |
|
70 : base_minimizer (a), phi (a.phi), bnds (a.bnds), lc (a.lc), nlc (a.nlc) |
|
71 { } |
|
72 |
1528
|
73 NLP& operator = (const NLP& a) |
|
74 { |
|
75 if (this != &a) |
|
76 { |
1835
|
77 base_minimizer::operator = (a); |
|
78 |
1528
|
79 phi = a.phi; |
|
80 bnds = a.bnds; |
|
81 lc = a.lc; |
|
82 nlc = a.nlc; |
|
83 } |
|
84 return *this; |
|
85 } |
287
|
86 |
1528
|
87 virtual ~NLP (void) { } |
287
|
88 |
1863
|
89 Objective objective (void) const { return phi; } |
|
90 |
|
91 Bounds bounds (void) const { return bnds; } |
|
92 |
|
93 LinConst linear_constraints (void) const { return lc; } |
3
|
94 |
1863
|
95 NLConst nonlinear_constraints (void) const { return nlc; } |
|
96 |
|
97 protected: |
|
98 |
|
99 Objective phi; |
3
|
100 Bounds bnds; |
|
101 LinConst lc; |
|
102 NLConst nlc; |
|
103 }; |
|
104 |
|
105 #endif |
|
106 |
|
107 /* |
|
108 ;;; Local Variables: *** |
|
109 ;;; mode: C++ *** |
|
110 ;;; End: *** |
|
111 */ |