Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

opensub.h
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include <ogdf/basic/List.h>
34 
35 #pragma GCC visibility push(default)
36 namespace abacus {
37 
38 
39 class Master;
40 class Sub;
41 
42 
44 
50 class OGDF_EXPORT OpenSub : public AbacusRoot {
51 
52  friend class Sub;
53  friend class Master;
54 
55 public:
56 
58 
66  OpenSub(Master *master) : master_(master) { }
67 
69  int number() const {
70  return list_.size();
71  }
72 
74  bool empty() const {
75  return list_.empty();
76  }
77 
79  double dualBound() const;
80 
81 private:
82 
84 
91  Sub *select();
92 
94 
97  void insert(Sub *sub);
98 
100 
103  void remove(Sub *sub) {
104  if(list_.removeFirst(sub))
105  updateDualBound();
106  }
107 
109  void prune() {
110  list_.clear();
111  }
112 
114  void updateDualBound();
115 
118  double dualBound_;
119 
120  OpenSub(const OpenSub &rhs);
121  const OpenSub &operator=(const OpenSub &rhs);
122 };
123 
124 }
125 #pragma GCC visibility pop
abacus::OpenSub::list_
ogdf::List< Sub * > list_
The list storing the open subproblems.
Definition: opensub.h:117
abacusroot.h
abacus::OpenSub::master_
Master * master_
A pointer to corresponding master of the optimization.
Definition: opensub.h:116
abacus
Definition: ILPClusterPlanarity.h:50
abacus::OpenSub::OpenSub
OpenSub(Master *master)
Creates an empty list of open subproblems.
Definition: opensub.h:66
abacus::OpenSub::dualBound_
double dualBound_
The dual bound of all open subproblems.
Definition: opensub.h:118
abacus::OpenSub::remove
void remove(Sub *sub)
Removes subproblem from the set of open subproblems.
Definition: opensub.h:103
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:69
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
abacus::OpenSub
Maintains open subproblems.
Definition: opensub.h:50
abacus::OpenSub::empty
bool empty() const
Returns true if there is no subproblem in the set of open subproblems, false otherwise.
Definition: opensub.h:74
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::OpenSub::prune
void prune()
Removes all elements from the set of opens subproblems.
Definition: opensub.h:109
List.h
Declaration of doubly linked lists and iterators.
abacus::OpenSub::number
int number() const
Returns the current number of open subproblems contained in this set.
Definition: opensub.h:69
abacus::Master
The master of the optimization.
Definition: master.h:70