Dip 0.95.0
Loading...
Searching...
No Matches
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>
9using namespace std;
10
11class DippyDecompCut : public DecompCut {
12private:
13 double m_lb;
14 double m_ub;
15 int m_nElems;
16 int* m_indices;
17 double* m_elements;
18
19public:
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)
void setUpperBound(const double ub)
Definition DecompCut.h:67
void setLowerBound(const double lb)
Definition DecompCut.h:64
DippyDecompCut(double lb, double ub, int nElems, int *indices, double *elements)
void expandCutToRow(CoinPackedVector *row)