3
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
3
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
3
|
20 |
|
21 */ |
|
22 |
382
|
23 #if !defined (octave_LP_h) |
|
24 #define octave_LP_h 1 |
|
25 |
465
|
26 #include "dColVector.h" |
3
|
27 #include "Bounds.h" |
|
28 #include "LinConst.h" |
1528
|
29 #include "base-min.h" |
3
|
30 |
1528
|
31 class LP : public base_minimizer |
3
|
32 { |
1867
|
33 public: |
3
|
34 |
1867
|
35 LP (void) |
|
36 : base_minimizer (), c (), bnds (), lc () { } |
1528
|
37 |
|
38 LP (const ColumnVector& c_arg) |
1867
|
39 : base_minimizer (), c (c_arg), bnds (), lc () { } |
3
|
40 |
1528
|
41 LP (const ColumnVector& c_arg, const Bounds& b) |
1867
|
42 : base_minimizer (), c (c_arg), bnds (b), lc () { } |
1528
|
43 |
|
44 LP (const ColumnVector& c_arg, const Bounds& b, const LinConst& l) |
|
45 : base_minimizer (), c (c_arg), bnds (b), lc (l) { } |
|
46 |
|
47 LP (const ColumnVector& c_arg, const LinConst& l) |
1867
|
48 : base_minimizer (), c (c_arg), bnds (), lc (l) { } |
3
|
49 |
1835
|
50 LP (const LP& a) |
|
51 : base_minimizer (a), c (a.c), bnds (a.bnds), lc (a.lc) { } |
|
52 |
|
53 LP& operator = (const LP& a) |
|
54 { |
|
55 if (this != &a) |
|
56 { |
|
57 base_minimizer::operator = (a); |
|
58 |
|
59 c = a.c; |
|
60 bnds = a.bnds; |
|
61 lc = a.lc; |
|
62 } |
|
63 return *this; |
|
64 } |
|
65 |
|
66 ~LP (void) { } |
|
67 |
1867
|
68 ColumnVector linear_obj_coeff (void) const { return c; } |
|
69 |
|
70 Bounds bounds (void) const { return bnds; } |
|
71 |
|
72 LinConst linear_constraints (void) const { return lc; } |
|
73 |
|
74 protected: |
3
|
75 |
1528
|
76 ColumnVector c; |
3
|
77 Bounds bnds; |
|
78 LinConst lc; |
|
79 }; |
|
80 |
|
81 #endif |
|
82 |
|
83 /* |
|
84 ;;; Local Variables: *** |
|
85 ;;; mode: C++ *** |
|
86 ;;; End: *** |
|
87 */ |