DippyDecompCut.h
Go to the documentation of this file.00001 #ifndef DIPPY_DECOMP_CUT_H
00002 #define DIPPY_DECOMP_CUT_H
00003
00004 #include "Decomp.h"
00005 #include "DecompCut.h"
00006 #include "UtilMacros.h"
00007
00008 #include <vector>
00009 using namespace std;
00010
00011 class DippyDecompCut : public DecompCut {
00012 private:
00013 double m_lb;
00014 double m_ub;
00015 int m_nElems;
00016 int* m_indices;
00017 double* m_elements;
00018
00019 public:
00020 DippyDecompCut(double lb, double ub, int nElems, int* indices, double* elements) :
00021 m_lb(lb), m_ub(ub), m_nElems(nElems), m_indices(indices), m_elements(elements) {
00022 setLowerBound(m_lb);
00023 setUpperBound(m_ub);
00024 }
00025 void expandCutToRow(CoinPackedVector* row) {
00026 row->setVector(m_nElems, m_indices, m_elements, false);
00027 }
00028
00029 ~DippyDecompCut() {
00030 delete [] m_indices;
00031 delete [] m_elements;
00032 }
00033 };
00034
00035
00036 #endif