SmiLinearData.hpp
Go to the documentation of this file.
1 // Copyright (C) 2004, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 //
4 // SmiLinear.hpp: interface for the SmiLinearData classes.
5 //
6 //
7 // Alan King
8 // 9 March 2004
10 
11 #ifndef SmiLinearData_HPP
12 #define SmiLinearData_HPP
13 
14 #if defined(_MSC_VER)
15 // Turn off compiler warning about long names
16 # pragma warning(disable:4786)
17 #endif
18 
19 #include "CoinPackedVector.hpp"
20 #include "CoinPackedMatrix.hpp"
21 #include "OsiSolverInterface.hpp"
22 
24 {
25 public:
26  inline const CoinPackedMatrix &getMatrix() {return matrix_; }
27  inline const CoinPackedVector &getColLower() {return dclo_;}
28  inline const CoinPackedVector &getColUpper() {return dcup_;}
29  inline const CoinPackedVector &getObjective(){return dobj_;}
30  inline const CoinPackedVector &getRowLower() {return drlo_;}
31  inline const CoinPackedVector &getRowUpper() {return drup_;}
32 
39 
40 
42  dclo_(),
43  dcup_(),
44  dobj_(),
45  drlo_(),
46  drup_()
47  {}
48 
50  matrix_(d.getMatrix()),
51  dclo_(d.getColLower()),
52  dcup_(d.getColUpper()),
53  dobj_(d.getObjective()),
54  drlo_(d.getRowLower()),
55  drup_(d.getRowUpper())
56  {}
57 
60  CoinPackedVector &dobj,
61  CoinPackedVector &drlo, CoinPackedVector &drup): matrix_(matrix),
62  dclo_(dclo),
63  dcup_(dcup),
64  dobj_(dobj),
65  drlo_(drlo),
66  drup_(drup)
67  {}
68  SmiLinearData(OsiSolverInterface &osi):matrix_((*osi.getMatrixByCol()))
69  {
75  }
76 
78 private:
85 };
86 
87 #endif //SmiLinearData_HPP
88 
const CoinPackedMatrix & getMatrix()
const CoinPackedVector & getRowLower()
virtual const double * getRowLower() const =0
Get a pointer to an array[getNumRows()] of row lower bounds.
virtual const double * getRowUpper() const =0
Get a pointer to an array[getNumRows()] of row upper bounds.
CoinPackedMatrix matrix_
CoinPackedVector & getMutableObjective()
virtual const double * getColUpper() const =0
Get a pointer to an array[getNumCols()] of column upper bounds.
const CoinPackedVector & getColUpper()
CoinPackedVector & getMutableColLower()
SmiLinearData(OsiSolverInterface &osi)
int getNumRows() const
Number of rows.
virtual const double * getObjCoefficients() const =0
Get a pointer to an array[getNumCols()] of objective function coefficients.
Sparse Matrix Base Class.
CoinPackedVector drlo_
CoinPackedVector drup_
const CoinPackedVector & getRowUpper()
CoinPackedVector & getMutableRowLower()
SmiLinearData(SmiLinearData &d)
CoinPackedVector & getMutableRowUpper()
CoinPackedVector dclo_
const CoinPackedVector & getObjective()
virtual const double * getColLower() const =0
Get a pointer to an array[getNumCols()] of column lower bounds.
CoinPackedVector dcup_
int getNumCols() const
Number of columns.
CoinPackedMatrix & getMutableMatrix()
Abstract Base Class for describing an interface to a solver.
CoinPackedVector & getMutableColUpper()
Sparse Vector.
const CoinPackedVector & getColLower()
SmiLinearData(CoinPackedMatrix &matrix, CoinPackedVector &dclo, CoinPackedVector &dcup, CoinPackedVector &dobj, CoinPackedVector &drlo, CoinPackedVector &drup)
CoinPackedVector dobj_