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 |
3585
|
31 class |
4062
|
32 octave_LP : public base_minimizer |
3
|
33 { |
1867
|
34 public: |
3
|
35 |
4062
|
36 octave_LP (void) |
1867
|
37 : base_minimizer (), c (), bnds (), lc () { } |
1528
|
38 |
4062
|
39 octave_LP (const ColumnVector& c_arg) |
1867
|
40 : base_minimizer (), c (c_arg), bnds (), lc () { } |
3
|
41 |
4062
|
42 octave_LP (const ColumnVector& c_arg, const Bounds& b) |
1867
|
43 : base_minimizer (), c (c_arg), bnds (b), lc () { } |
1528
|
44 |
4062
|
45 octave_LP (const ColumnVector& c_arg, const Bounds& b, const LinConst& l) |
1528
|
46 : base_minimizer (), c (c_arg), bnds (b), lc (l) { } |
|
47 |
4062
|
48 octave_LP (const ColumnVector& c_arg, const LinConst& l) |
1867
|
49 : base_minimizer (), c (c_arg), bnds (), lc (l) { } |
3
|
50 |
4062
|
51 octave_LP (const octave_LP& a) |
1835
|
52 : base_minimizer (a), c (a.c), bnds (a.bnds), lc (a.lc) { } |
|
53 |
4062
|
54 octave_LP& operator = (const octave_LP& a) |
1835
|
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 |
4062
|
67 ~octave_LP (void) { } |
1835
|
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 ;;; End: *** |
|
88 */ |