Dip
0.95.0
Loading...
Searching...
No Matches
src
dippy
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
}
25
void
expandCutToRow
(
CoinPackedVector
* row) {
26
row->
setVector
(m_nElems, m_indices, m_elements,
false
);
27
}
28
29
~DippyDecompCut
() {
30
delete
[] m_indices;
31
delete
[] m_elements;
32
}
33
};
34
35
36
#endif
DecompCut.h
Decomp.h
UtilMacros.h
CoinPackedVector
CoinPackedVector::setVector
void setVector(int size, const int *inds, const double *elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
DecompCut
Definition
DecompCut.h:34
DecompCut::setUpperBound
void setUpperBound(const double ub)
Definition
DecompCut.h:67
DecompCut::setLowerBound
void setLowerBound(const double lb)
Definition
DecompCut.h:64
DippyDecompCut
Definition
DippyDecompCut.h:11
DippyDecompCut::~DippyDecompCut
~DippyDecompCut()
Definition
DippyDecompCut.h:29
DippyDecompCut::DippyDecompCut
DippyDecompCut(double lb, double ub, int nElems, int *indices, double *elements)
Definition
DippyDecompCut.h:20
DippyDecompCut::expandCutToRow
void expandCutToRow(CoinPackedVector *row)
Definition
DippyDecompCut.h:25
Generated by
1.11.0