Dip 0.95.0
Loading...
Searching...
No Matches
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// ---------------------------------------------------------------------- //
26private:
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
31public:
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() {
52 UTIL_DELPTR(m_cut);
53 }
54 inline void deleteRow() {
55 UTIL_DELPTR(m_row);
56 }
57 inline void deleteRowReform() {
58 UTIL_DELPTR(m_rowReform);
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
72public:
74 m_cut = x.m_cut;
75 m_row = x.m_row;
76 m_rowReform = x.m_rowReform;
77 }
78
81 CoinPackedVector* rowReform = 0) :
82 m_cut(cut),
83 m_row(row),
84 m_rowReform(rowReform) {}
85
87};
88
89#endif
90
#define UTIL_DELPTR(x)
Definition UtilMacros.h:64
double getLowerBound() const
Definition DecompCut.h:47
double getUpperBound() const
Definition DecompCut.h:50
double getViolation() const
Definition DecompCut.h:53
CoinPackedVector * getRowReformPtr() const
CoinPackedVector * getRowPtr() const
const double getViolation() const
DecompWaitingRow(const DecompWaitingRow &x)
bool setViolation(const double *x)
void setRow(CoinPackedVector *row)
const double getLowerBound() const
DecompCut * getCutPtr() const
const double getUpperBound() const
DecompWaitingRow(DecompCut *cut, CoinPackedVector *row, CoinPackedVector *rowReform=0)
void setRowReform(CoinPackedVector *rowReform)