3
|
1 // QP.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 |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
382
|
24 #if !defined (octave_QP_h) |
|
25 #define octave_QP_h 1 |
|
26 |
1296
|
27 #if defined (__GNUG__) |
|
28 #pragma interface |
|
29 #endif |
|
30 |
463
|
31 #include "dMatrix.h" |
|
32 #include "dColVector.h" |
3
|
33 #include "Bounds.h" |
|
34 #include "LinConst.h" |
|
35 |
|
36 #ifndef Vector |
|
37 #define Vector ColumnVector |
|
38 #endif |
|
39 |
|
40 class QP |
|
41 { |
|
42 public: |
|
43 |
|
44 QP (void); |
|
45 QP (const Vector& x, const Matrix& H); |
|
46 QP (const Vector& x, const Matrix& H, const Vector& c); |
|
47 QP (const Vector& x, const Matrix& H, const Bounds& b); |
|
48 QP (const Vector& x, const Matrix& H, const LinConst& lc); |
|
49 QP (const Vector& x, const Matrix& H, const Vector& c, const Bounds& b); |
|
50 QP (const Vector& x, const Matrix& H, const Vector& c, const LinConst& lc); |
|
51 QP (const Vector& x, const Matrix& H, const Bounds& b, const LinConst& lc); |
|
52 QP (const Vector& x, const Matrix& H, const Vector& c, const Bounds& b, |
|
53 const LinConst& lc); |
|
54 |
|
55 virtual Vector minimize (void); |
|
56 virtual Vector minimize (double& objf); |
|
57 virtual Vector minimize (double& objf, int& inform); |
|
58 virtual Vector minimize (double& objf, int& inform, Vector& lambda) = 0; |
|
59 |
|
60 virtual Vector minimize (const Vector& x); |
|
61 virtual Vector minimize (const Vector& x, double& objf); |
|
62 virtual Vector minimize (const Vector& x, double& objf, int& inform); |
|
63 virtual Vector minimize (const Vector& x, double& objf, int& inform, |
|
64 Vector& lambda); |
|
65 |
|
66 protected: |
|
67 |
|
68 Vector x; |
|
69 Matrix H; |
|
70 Vector c; |
|
71 Bounds bnds; |
|
72 LinConst lc; |
|
73 |
|
74 private: |
|
75 |
|
76 Matrix make_h_symmetric (void); |
|
77 }; |
|
78 |
|
79 #endif |
|
80 |
|
81 /* |
|
82 ;;; Local Variables: *** |
|
83 ;;; mode: C++ *** |
|
84 ;;; page-delimiter: "^/\\*" *** |
|
85 ;;; End: *** |
|
86 */ |