Dip  0.92.4
DecompWaitingRow.h
Go to the documentation of this file.
1 //===========================================================================//
2 // This file is part of the Decomp Solver Framework. //
3 // //
4 // Decomp is distributed under the Common 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 // Copyright (C) 2002-2007, Lehigh University, Matthew Galati, and Ted Ralphs//
10 // All Rights Reserved. //
11 //===========================================================================//
12 
13 
14 #ifndef DECOMP_WAITING_ROW_INCLUDE
15 #define DECOMP_WAITING_ROW_INCLUDE
16 
17 //class DecompCut;
18 #include "DecompCut.h"
19 
20 //TODO? use to have DecompRow = CoinPackedVector
21 
22 // ---------------------------------------------------------------------- //
23 class DecompWaitingRow {
24 private:
25  //THINK
26  //DecompWaitingRow & operator=(const DecompWaitingRow &);
27 
28 private:
29  DecompCut* m_cut; //the cut
30  CoinPackedVector* m_row; //the row (in terms of x)
31  CoinPackedVector* m_rowReform; //the row (in terms of reformulation)
32 
33 public:
34  inline DecompCut* getCutPtr() const {
35  return m_cut;
36  }
37  inline CoinPackedVector* getRowPtr() const {
38  return m_row;
39  }
41  return m_rowReform;
42  }
43  inline const double getViolation() const {
44  return m_cut->getViolation();
45  }
46  inline const double getLowerBound() const {
47  return m_cut->getLowerBound();
48  }
49  inline const double getUpperBound() const {
50  return m_cut->getUpperBound();
51  }
52 
53  inline void deleteCut() {
54  //cout << "\ndelete m_cut: " << m_cut << "\n";
56  }
57  inline void deleteRow() {
59  }
60  inline void deleteRowReform() {
62  }
63  inline void clearCut() {
64  m_cut = 0;
65  }
66 
67  inline void setRow(CoinPackedVector* row) {
68  m_row = row;
69  }
70  inline void setRowReform(CoinPackedVector* rowReform) {
71  m_rowReform = rowReform;
72  }
73 
74  bool setViolation(const double* x);
75 
76 public:
78  m_cut = x.m_cut;
79  m_row = x.m_row;
81  }
82 
84  CoinPackedVector* row,
85  CoinPackedVector* rowReform = 0) :
86  m_cut(cut),
87  m_row(row),
88  m_rowReform(rowReform) {}
89 
91 };
92 
93 #endif
94 
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