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