Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

branchrule.h
Go to the documentation of this file.
1 
31 #pragma once
32 
34 
35 namespace abacus {
36 
37 class Master;
38 class Sub;
39 class LpSub;
40 
41 
43 
60 public:
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 
130 protected:
132 
134 };
135 
136 }
abacus::BranchRule::branchOnSetVar
virtual bool branchOnSetVar()
Should indicate if the branching is performed by setting a binary variable.
Definition: branchrule.h:114
abacus::BranchRule
Abstract base class for all branching rules.
Definition: branchrule.h:59
abacusroot.h
abacus
Definition: abacusroot.h:48
OGDF_NEW_DELETE
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition: memory.h:84
abacus::BranchRule::initialize
virtual void initialize(Sub *sub)
Called from the constructor of a subproblem.
Definition: branchrule.h:128
ogdf::AlgorithmFailureCode::LpSub
@ LpSub
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
abacus::BranchRule::master_
Master * master_
A pointer to the corresponding master of the optimization.
Definition: branchrule.h:131
abacus::BranchRule::BranchRule
BranchRule(Master *master)
Initializes a branching rule.
Definition: branchrule.h:66
abacus::LpSub
The linear program of a subproblem.
Definition: lpsub.h:61
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
abacus::Sub
The subproblem.
Definition: sub.h:68
abacus::BranchRule::~BranchRule
virtual ~BranchRule()
Definition: branchrule.h:69
abacus::Master
The master of the optimization.
Definition: master.h:69