3
|
1 // NLP.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_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 |
1528
|
34 class NLP : public base_minimizer |
3
|
35 { |
|
36 public: |
|
37 |
1528
|
38 NLP (void) : base_minimizer () { } |
3
|
39 |
1528
|
40 NLP (const ColumnVector& x, const Objective& obj) |
|
41 : base_minimizer (x), phi (obj) { } |
3
|
42 |
1528
|
43 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b) |
|
44 : base_minimizer (x), phi (obj), bnds (b) { } |
3
|
45 |
1528
|
46 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
47 const LinConst& l) |
|
48 : base_minimizer (x), phi (obj), bnds (b), lc (l) { } |
3
|
49 |
1528
|
50 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
51 const LinConst& l, const NLConst& nl) |
|
52 : base_minimizer (x), phi (obj), bnds (b), lc (l), nlc (nl) { } |
3
|
53 |
1528
|
54 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l) |
|
55 : base_minimizer (x), phi (obj), lc (l) { } |
|
56 |
|
57 NLP (const ColumnVector& x, const Objective& obj, const LinConst& l, |
|
58 const NLConst& nl) |
|
59 : base_minimizer (x), phi (obj), lc (l), nlc (nl) { } |
3
|
60 |
1528
|
61 NLP (const ColumnVector& x, const Objective& obj, const NLConst& nl) |
|
62 : base_minimizer (x), phi (obj), nlc (nl) { } |
3
|
63 |
1528
|
64 NLP (const ColumnVector& x, const Objective& obj, const Bounds& b, |
|
65 const NLConst& nl) |
|
66 : base_minimizer (x), phi (obj), bnds (b), nlc (nl) { } |
3
|
67 |
1528
|
68 NLP& operator = (const NLP& a) |
|
69 { |
|
70 if (this != &a) |
|
71 { |
|
72 x = a.x; |
|
73 phi = a.phi; |
|
74 bnds = a.bnds; |
|
75 lc = a.lc; |
|
76 nlc = a.nlc; |
|
77 } |
3
|
78 |
1528
|
79 return *this; |
|
80 } |
287
|
81 |
1528
|
82 virtual ~NLP (void) { } |
287
|
83 |
1528
|
84 int size (void) const { return x.capacity (); } |
3
|
85 |
|
86 protected: |
|
87 |
|
88 Objective phi; |
|
89 Bounds bnds; |
|
90 LinConst lc; |
|
91 NLConst nlc; |
|
92 }; |
|
93 |
|
94 #endif |
|
95 |
|
96 /* |
|
97 ;;; Local Variables: *** |
|
98 ;;; mode: C++ *** |
|
99 ;;; page-delimiter: "^/\\*" *** |
|
100 ;;; End: *** |
|
101 */ |