Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
branchrule.h
Go to the documentation of this file.
1
31#pragma once
32
34
35namespace abacus {
36
37class Master;
38class Sub;
39class LpSub;
40
41
43
60public:
61
63
66 BranchRule(Master *master) : master_(master) { }
67
68
69 virtual ~BranchRule() { }
70
71
73
79 virtual int extract(Sub *sub) = 0;
80
81
83
90 virtual void extract(LpSub *lp);
91
92
94
99 virtual void unExtract(LpSub *lp);
100
101
103
114 virtual bool branchOnSetVar() {
115 return false;
116 }
117
118
120
128 virtual void initialize(Sub* sub) { }
129
130protected:
132
134};
135
136}
Base class of all other classes of ABACUS.
Definition abacusroot.h:68
Abstract base class for all branching rules.
Definition branchrule.h:59
virtual ~BranchRule()
Definition branchrule.h:69
virtual bool branchOnSetVar()
Should indicate if the branching is performed by setting a binary variable.
Definition branchrule.h:114
virtual int extract(Sub *sub)=0
Modifies a subproblem by setting the branching variable.
virtual void unExtract(LpSub *lp)
Should undo the modifictions of the linear programming relaxtion |lp|.
virtual void extract(LpSub *lp)
Should modify the linear programming relaxation |lp| in order to determine the quality of the branchi...
virtual void initialize(Sub *sub)
Called from the constructor of a subproblem.
Definition branchrule.h:128
BranchRule(Master *master)
Initializes a branching rule.
Definition branchrule.h:66
Master * master_
A pointer to the corresponding master of the optimization.
Definition branchrule.h:131
The linear program of a subproblem.
Definition lpsub.h:61
The master of the optimization.
Definition master.h:69
The subproblem.
Definition sub.h:68
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition memory.h:84