Dip  0.92.4
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
void setVector(int size, const int *inds, const double *elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
Set vector size, indices, and elements.
void expandCutToRow(CoinPackedVector *row)
double * m_elements
DippyDecompCut(double lb, double ub, int nElems, int *indices, double *elements)
Sparse Vector.