3
|
1 // QPSOL.h -*- C++ -*- |
|
2 /* |
|
3 |
1835
|
4 Copyright (C) 1996 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_QPSOL_h) |
|
25 #define octave_QPSOL_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
645
|
31 #ifndef QPSOL_MISSING |
|
32 |
465
|
33 #include "dMatrix.h" |
|
34 #include "dColVector.h" |
3
|
35 #include "QP.h" |
|
36 |
1860
|
37 class |
|
38 QPSOL_options |
289
|
39 { |
1860
|
40 public: |
289
|
41 |
|
42 QPSOL_options (void); |
|
43 QPSOL_options (const QPSOL_options& opt); |
|
44 |
|
45 QPSOL_options& operator = (const QPSOL_options& opt); |
|
46 |
|
47 ~QPSOL_options (void); |
|
48 |
|
49 void init (void); |
|
50 void copy (const QPSOL_options& opt); |
|
51 |
|
52 void set_default_options (void); |
|
53 |
|
54 void set_feasibility_tolerance (double); |
|
55 void set_infinite_bound (double); |
|
56 void set_iteration_limit (int); |
|
57 void set_print_level (int); |
|
58 |
|
59 double feasibility_tolerance (void); |
|
60 double infinite_bound (void); |
|
61 int iteration_limit (void); |
|
62 int print_level (void); |
|
63 |
1860
|
64 private: |
289
|
65 |
|
66 double x_feasibility_tolerance; |
|
67 double x_infinite_bound; |
|
68 int x_iteration_limit; |
|
69 int x_print_level; |
|
70 }; |
|
71 |
1860
|
72 class |
|
73 QPSOL : public QP, public QPSOL_options |
3
|
74 { |
1860
|
75 public: |
3
|
76 |
1835
|
77 QPSOL (void) |
|
78 : QP (), QPSOL_options () { } |
1528
|
79 |
1835
|
80 QPSOL (const ColumnVector& x, const Matrix& H) |
|
81 : QP (x, H), QPSOL_options () { } |
3
|
82 |
1528
|
83 QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c) |
1835
|
84 : QP (x, H, c), QPSOL_options () { } |
3
|
85 |
1528
|
86 QPSOL (const ColumnVector& x, const Matrix& H, const Bounds& b) |
1835
|
87 : QP (x, H, b), QPSOL_options () { } |
3
|
88 |
1528
|
89 QPSOL (const ColumnVector& x, const Matrix& H, const LinConst& lc) |
1835
|
90 : QP (x, H, lc), QPSOL_options () { } |
3
|
91 |
1528
|
92 QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, |
1835
|
93 const Bounds& b) |
|
94 : QP (x, H, c, b), QPSOL_options () { } |
3
|
95 |
1528
|
96 QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, |
1835
|
97 const LinConst& lc) |
|
98 : QP (x, H, c, lc), QPSOL_options () { } |
3
|
99 |
1528
|
100 QPSOL (const ColumnVector& x, const Matrix& H, const Bounds& b, |
|
101 const LinConst& lc) |
1835
|
102 : QP (x, H, b, lc), QPSOL_options () { } |
3
|
103 |
1528
|
104 QPSOL (const ColumnVector& x, const Matrix& H, const ColumnVector& c, |
1835
|
105 const Bounds& b, const LinConst& lc) |
|
106 : QP (x, H, c, b, lc), QPSOL_options () { } |
3
|
107 |
1835
|
108 QPSOL (const QPSOL& a) |
|
109 : QP (a), QPSOL_options (a) { } |
3
|
110 |
1528
|
111 QPSOL& operator = (const QPSOL& a) |
|
112 { |
1835
|
113 QP::operator = (a); |
|
114 QPSOL_options::operator = (a); |
1528
|
115 return *this; |
|
116 } |
|
117 |
|
118 ColumnVector do_minimize (double& objf, int& inform, ColumnVector& lambda); |
|
119 }; |
3
|
120 |
1359
|
121 #endif |
3
|
122 #endif |
|
123 |
|
124 /* |
|
125 ;;; Local Variables: *** |
|
126 ;;; mode: C++ *** |
|
127 ;;; page-delimiter: "^/\\*" *** |
|
128 ;;; End: *** |
|
129 */ |