Dip  0.92.4
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 // Authors: Matthew Galati, SAS Institute Inc. (matthew.galati@sas.com) //
8 // Ted Ralphs, Lehigh University (ted@lehigh.edu) //
9 // Jiadong Wang, Lehigh University (jiw408@lehigh.edu) //
10 // //
11 // Copyright (C) 2002-2019, Lehigh University, Matthew Galati, Ted Ralphs //
12 // All Rights Reserved. //
13 //===========================================================================//
14 
15 
16 #ifndef DECOMP_WAITING_ROW_INCLUDE
17 #define DECOMP_WAITING_ROW_INCLUDE
18 
19 //class DecompCut;
20 #include "DecompCut.h"
21 
22 //TODO? use to have DecompRow = CoinPackedVector
23 
24 // ---------------------------------------------------------------------- //
26 private:
27  DecompCut* m_cut; //the cut
28  CoinPackedVector* m_row; //the row (in terms of x)
29  CoinPackedVector* m_rowReform; //the row (in terms of reformulation)
30 
31 public:
32  inline DecompCut* getCutPtr() const {
33  return m_cut;
34  }
35  inline CoinPackedVector* getRowPtr() const {
36  return m_row;
37  }
39  return m_rowReform;
40  }
41  inline const double getViolation() const {
42  return m_cut->getViolation();
43  }
44  inline const double getLowerBound() const {
45  return m_cut->getLowerBound();
46  }
47  inline const double getUpperBound() const {
48  return m_cut->getUpperBound();
49  }
50 
51  inline void deleteCut() {
53  }
54  inline void deleteRow() {
56  }
57  inline void deleteRowReform() {
59  }
60  inline void clearCut() {
61  m_cut = 0;
62  }
63  inline void setRow(CoinPackedVector* row) {
64  m_row = row;
65  }
66  inline void setRowReform(CoinPackedVector* rowReform) {
67  m_rowReform = rowReform;
68  }
69 
70  bool setViolation(const double* x);
71 
72 public:
74  m_cut = x.m_cut;
75  m_row = x.m_row;
77  }
78 
80  CoinPackedVector* row,
81  CoinPackedVector* rowReform = 0) :
82  m_cut(cut),
83  m_row(row),
84  m_rowReform(rowReform) {}
85 
87 };
88 
89 #endif
90 
bool setViolation(const double *x)
double getUpperBound() const
Definition: DecompCut.h:50
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:47
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:53