Dip-All  0.91.0
DecompWaitingRow.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the DIP Solver Framework. //
3 // //
4 // DIP is distributed under the Eclipse Public License as part of the //
5 // COIN-OR repository (http://www.coin-or.org). //
6 // //
7 // Author: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // //
9 // Conceptual Design: Matthew Galati, SAS Institute Inc. //
10 // Ted Ralphs, Lehigh University //
11 // //
12 // Copyright (C) 2002-2015, Lehigh University, Matthew Galati, Ted Ralphs //
13 // All Rights Reserved. //
14 //===========================================================================//
15 
16 
17 #ifndef DECOMP_WAITING_ROW_INCLUDE
18 #define DECOMP_WAITING_ROW_INCLUDE
19 
20 //class DecompCut;
21 #include "DecompCut.h"
22 
23 //TODO? use to have DecompRow = CoinPackedVector
24 
25 // ---------------------------------------------------------------------- //
27 private:
28  DecompCut* m_cut; //the cut
29  CoinPackedVector* m_row; //the row (in terms of x)
30  CoinPackedVector* m_rowReform; //the row (in terms of reformulation)
31 
32 public:
33  inline DecompCut* getCutPtr() const {
34  return m_cut;
35  }
36  inline CoinPackedVector* getRowPtr() const {
37  return m_row;
38  }
40  return m_rowReform;
41  }
42  inline const double getViolation() const {
43  return m_cut->getViolation();
44  }
45  inline const double getLowerBound() const {
46  return m_cut->getLowerBound();
47  }
48  inline const double getUpperBound() const {
49  return m_cut->getUpperBound();
50  }
51 
52  inline void deleteCut() {
54  }
55  inline void deleteRow() {
57  }
58  inline void deleteRowReform() {
60  }
61  inline void clearCut() {
62  m_cut = 0;
63  }
64  inline void setRow(CoinPackedVector* row) {
65  m_row = row;
66  }
67  inline void setRowReform(CoinPackedVector* rowReform) {
68  m_rowReform = rowReform;
69  }
70 
71  bool setViolation(const double* x);
72 
73 public:
75  m_cut = x.m_cut;
76  m_row = x.m_row;
78  }
79 
81  CoinPackedVector* row,
82  CoinPackedVector* rowReform = 0) :
83  m_cut(cut),
84  m_row(row),
85  m_rowReform(rowReform) {}
86 
88 };
89 
90 #endif
91 
bool setViolation(const double *x)
double getUpperBound() const
Definition: DecompCut.h:51
void setRowReform(CoinPackedVector *rowReform)
DecompWaitingRow(const DecompWaitingRow &x)
const double getLowerBound() const
DecompCut * getCutPtr() const
CoinPackedVector * getRowReformPtr() const
const double getViolation() const
double getLowerBound() const
Definition: DecompCut.h:48
CoinPackedVector * m_rowReform
#define UTIL_DELPTR(x)
Definition: UtilMacros.h:28
Sparse Vector.
CoinPackedVector * getRowPtr() const
DecompWaitingRow(DecompCut *cut, CoinPackedVector *row, CoinPackedVector *rowReform=0)
CoinPackedVector * m_row
const double getUpperBound() const
void setRow(CoinPackedVector *row)
double getViolation() const
Definition: DecompCut.h:54