Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
conbranchrule.h
Go to the documentation of this file.
1
34#pragma once
35
40
41namespace abacus {
42
45public:
46
48
59
60
61 virtual ~ConBranchRule() { }
62
64
70 friend OGDF_EXPORT std::ostream &operator<<(std::ostream &out, const ConBranchRule &rhs);
71
72
74
82 virtual int extract(Sub *sub) override;
83
84
86
89 virtual void extract(LpSub *lp) override;
90
91 virtual void unExtract(LpSub *lp) override;
92
93
95
98 virtual void initialize(Sub *sub) override;
99
100
103 return poolSlotRef_.conVar();
104 }
105
107 const Constraint *constraint() const {
108 return poolSlotRef_.conVar();
109 }
110
111private:
114
116};
117
118}
Base class for branching rules.
Abstract base class for all branching rules.
Definition branchrule.h:59
Implements the branching by adding a constraint to the set of active constraints.
ConBranchRule(Master *master, PoolSlot< Constraint, Variable > *poolSlot)
Creates a branching constraint.
virtual int extract(Sub *sub) override
Adds the branching constraint to the subproblem.
Constraint * constraint()
Returns a pointer to the branching constraint, or a 0-pointer if this constraint is not available.
const ConBranchRule & operator=(const ConBranchRule &rhs)
const Constraint * constraint() const
Returns a const pointer to the branching constraint, or a 0-pointer if this constraint is not availab...
virtual void extract(LpSub *lp) override
Overloaded to modify directly the linear programming relaxation.
friend std::ostream & operator<<(std::ostream &out, const ConBranchRule &rhs)
Output operator for branching constraints.
PoolSlotRef< Constraint, Variable > poolSlotRef_
A reference to the pool slot of the branching constraints.
virtual void initialize(Sub *sub) override
Initializes the subproblem associated with the branching constraint.
virtual void unExtract(LpSub *lp) override
Should undo the modifictions of the linear programming relaxtion |lp|.
Forms the virtual base class for all possible constraints given in pool format.
Definition constraint.h:56
The linear program of a subproblem.
Definition lpsub.h:61
The master of the optimization.
Definition master.h:69
Stores constraints and variables.
Definition poolslot.h:77
Stores a pointer to a pool slot with version number.
Definition poolslotref.h:54
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
constraint.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
poolslotref
variable.