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