Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

branchrule.h
Go to the documentation of this file.
1 
31 #pragma once
32 
34 
35 #pragma GCC visibility push(default)
36 namespace abacus {
37 
38 class Master;
39 class Sub;
40 class LpSub;
41 
42 
44 
61 public:
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 
131 protected:
133 
135 };
136 
137 }
138 #pragma GCC visibility pop
abacus::BranchRule::branchOnSetVar
virtual bool branchOnSetVar()
Should indicate if the branching is performed by setting a binary variable.
Definition: branchrule.h:115
abacus::BranchRule
Abstract base class for all branching rules.
Definition: branchrule.h:60
abacusroot.h
abacus
Definition: ILPClusterPlanarity.h:50
OGDF_NEW_DELETE
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition: memory.h:85
abacus::BranchRule::initialize
virtual void initialize(Sub *sub)
Called from the constructor of a subproblem.
Definition: branchrule.h:129
ogdf::AlgorithmFailureCode::LpSub
@ LpSub
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:69
abacus::BranchRule::master_
Master * master_
A pointer to the corresponding master of the optimization.
Definition: branchrule.h:132
abacus::BranchRule::BranchRule
BranchRule(Master *master)
Initializes a branching rule.
Definition: branchrule.h:67
abacus::LpSub
The linear program of a subproblem.
Definition: lpsub.h:62
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition: config.h:117
abacus::Sub
The subproblem.
Definition: sub.h:69
abacus::BranchRule::~BranchRule
virtual ~BranchRule()
Definition: branchrule.h:70
abacus::Master
The master of the optimization.
Definition: master.h:70