3
|
1 // LP.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_LP_h) |
|
25 #define octave_LP_h 1 |
|
26 |
465
|
27 #include "dColVector.h" |
3
|
28 #include "Bounds.h" |
|
29 #include "LinConst.h" |
1528
|
30 #include "base-min.h" |
3
|
31 |
1528
|
32 class LP : public base_minimizer |
3
|
33 { |
1867
|
34 public: |
3
|
35 |
1867
|
36 LP (void) |
|
37 : base_minimizer (), c (), bnds (), lc () { } |
1528
|
38 |
|
39 LP (const ColumnVector& c_arg) |
1867
|
40 : base_minimizer (), c (c_arg), bnds (), lc () { } |
3
|
41 |
1528
|
42 LP (const ColumnVector& c_arg, const Bounds& b) |
1867
|
43 : base_minimizer (), c (c_arg), bnds (b), lc () { } |
1528
|
44 |
|
45 LP (const ColumnVector& c_arg, const Bounds& b, const LinConst& l) |
|
46 : base_minimizer (), c (c_arg), bnds (b), lc (l) { } |
|
47 |
|
48 LP (const ColumnVector& c_arg, const LinConst& l) |
1867
|
49 : base_minimizer (), c (c_arg), bnds (), lc (l) { } |
3
|
50 |
1835
|
51 LP (const LP& a) |
|
52 : base_minimizer (a), c (a.c), bnds (a.bnds), lc (a.lc) { } |
|
53 |
|
54 LP& operator = (const LP& a) |
|
55 { |
|
56 if (this != &a) |
|
57 { |
|
58 base_minimizer::operator = (a); |
|
59 |
|
60 c = a.c; |
|
61 bnds = a.bnds; |
|
62 lc = a.lc; |
|
63 } |
|
64 return *this; |
|
65 } |
|
66 |
|
67 ~LP (void) { } |
|
68 |
1867
|
69 ColumnVector linear_obj_coeff (void) const { return c; } |
|
70 |
|
71 Bounds bounds (void) const { return bnds; } |
|
72 |
|
73 LinConst linear_constraints (void) const { return lc; } |
|
74 |
|
75 protected: |
3
|
76 |
1528
|
77 ColumnVector c; |
3
|
78 Bounds bnds; |
|
79 LinConst lc; |
|
80 }; |
|
81 |
|
82 #endif |
|
83 |
|
84 /* |
|
85 ;;; Local Variables: *** |
|
86 ;;; mode: C++ *** |
|
87 ;;; page-delimiter: "^/\\*" *** |
|
88 ;;; End: *** |
|
89 */ |