3
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 2000, 2002, 2003, 2005, |
|
4 2007 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 |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
3
|
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 |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
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 |
3585
|
32 class |
4062
|
33 octave_LP : public base_minimizer |
3
|
34 { |
1867
|
35 public: |
3
|
36 |
4062
|
37 octave_LP (void) |
4587
|
38 : base_minimizer (), cvec (), bnds (), lin_constr () { } |
1528
|
39 |
4587
|
40 octave_LP (const ColumnVector& c) |
|
41 : base_minimizer (), cvec (c), bnds (), lin_constr () { } |
3
|
42 |
4587
|
43 octave_LP (const ColumnVector& c, const Bounds& b) |
|
44 : base_minimizer (), cvec (c), bnds (b), lin_constr () { } |
1528
|
45 |
4587
|
46 octave_LP (const ColumnVector& c, const Bounds& b, const LinConst& l) |
|
47 : base_minimizer (), cvec (c), bnds (b), lin_constr (l) { } |
1528
|
48 |
4587
|
49 octave_LP (const ColumnVector& c, const LinConst& l) |
|
50 : base_minimizer (), cvec (c), bnds (), lin_constr (l) { } |
3
|
51 |
4062
|
52 octave_LP (const octave_LP& a) |
4587
|
53 : base_minimizer (a), cvec (a.cvec), bnds (a.bnds), lin_constr (a.lin_constr) { } |
1835
|
54 |
4062
|
55 octave_LP& operator = (const octave_LP& a) |
1835
|
56 { |
|
57 if (this != &a) |
|
58 { |
|
59 base_minimizer::operator = (a); |
|
60 |
4587
|
61 cvec = a.cvec; |
1835
|
62 bnds = a.bnds; |
4587
|
63 lin_constr = a.lin_constr; |
1835
|
64 } |
|
65 return *this; |
|
66 } |
|
67 |
4062
|
68 ~octave_LP (void) { } |
1835
|
69 |
4587
|
70 ColumnVector linear_obj_coeff (void) const { return cvec; } |
1867
|
71 |
|
72 Bounds bounds (void) const { return bnds; } |
|
73 |
4587
|
74 LinConst linear_constraints (void) const { return lin_constr; } |
1867
|
75 |
|
76 protected: |
3
|
77 |
4587
|
78 ColumnVector cvec; |
3
|
79 Bounds bnds; |
4587
|
80 LinConst lin_constr; |
3
|
81 }; |
|
82 |
|
83 #endif |
|
84 |
|
85 /* |
|
86 ;;; Local Variables: *** |
|
87 ;;; mode: C++ *** |
|
88 ;;; End: *** |
|
89 */ |