Dip  0.95.0
DippyDecompCut.h
Go to the documentation of this file.
1 #ifndef DIPPY_DECOMP_CUT_H
2 #define DIPPY_DECOMP_CUT_H
3 
4 #include "Decomp.h"
5 #include "DecompCut.h"
6 #include "UtilMacros.h"
7 
8 #include <vector>
9 using namespace std;
10 
11 class DippyDecompCut : public DecompCut {
12 private:
13  double m_lb;
14  double m_ub;
15  int m_nElems;
16  int* m_indices;
17  double* m_elements;
18 
19 public:
20  DippyDecompCut(double lb, double ub, int nElems, int* indices, double* elements) :
21  m_lb(lb), m_ub(ub), m_nElems(nElems), m_indices(indices), m_elements(elements) {
22  setLowerBound(m_lb);
23  setUpperBound(m_ub);
24  }
26  row->setVector(m_nElems, m_indices, m_elements, false);
27  }
28 
30  delete [] m_indices;
31  delete [] m_elements;
32  }
33 };
34 
35 
36 #endif
DippyDecompCut
Definition: DippyDecompCut.h:11
CoinPackedVector
CoinPackedVector::setVector
void setVector(int size, const int *inds, const double *elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
DecompCut.h
Decomp.h
DippyDecompCut::expandCutToRow
void expandCutToRow(CoinPackedVector *row)
Definition: DippyDecompCut.h:25
DippyDecompCut::~DippyDecompCut
~DippyDecompCut()
Definition: DippyDecompCut.h:29
DippyDecompCut::DippyDecompCut
DippyDecompCut(double lb, double ub, int nElems, int *indices, double *elements)
Definition: DippyDecompCut.h:20
DecompCut
Definition: DecompCut.h:34
UtilMacros.h