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