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
35#pragma GCC visibility push(default)
36namespace abacus {
37
38class Master;
39class Sub;
40class LpSub;
41
42
44
61public:
62
64
67 BranchRule(Master *master) : master_(master) { }
68
69
70 virtual ~BranchRule() { }
71
72
74
80 virtual int extract(Sub *sub) = 0;
81
82
84
91 virtual void extract(LpSub *lp);
92
93
95
100 virtual void unExtract(LpSub *lp);
101
102
104
115 virtual bool branchOnSetVar() {
116 return false;
117 }
118
119
121
129 virtual void initialize(Sub* sub) { }
130
131protected:
133
135};
136
137}
138#pragma GCC visibility pop
Base class of all other classes of ABACUS.
Definition abacusroot.h:69
Abstract base class for all branching rules.
Definition branchrule.h:60
virtual ~BranchRule()
Definition branchrule.h:70
virtual bool branchOnSetVar()
Should indicate if the branching is performed by setting a binary variable.
Definition branchrule.h:115
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:129
BranchRule(Master *master)
Initializes a branching rule.
Definition branchrule.h:67
Master * master_
A pointer to the corresponding master of the optimization.
Definition branchrule.h:132
The linear program of a subproblem.
Definition lpsub.h:62
The master of the optimization.
Definition master.h:70
The subproblem.
Definition sub.h:69
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition memory.h:85