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 namespace abacus {
36 
37 
38 class Master;
39 class Sub;
40 
41 
43 
49 class OGDF_EXPORT OpenSub : public AbacusRoot {
50 
51  friend class Sub;
52  friend class Master;
53 
54 public:
55 
57 
65  OpenSub(Master *master) : master_(master) { }
66 
68  int number() const {
69  return list_.size();
70  }
71 
73  bool empty() const {
74  return list_.empty();
75  }
76 
78  double dualBound() const;
79 
80 private:
81 
83 
90  Sub *select();
91 
93 
96  void insert(Sub *sub);
97 
99 
102  void remove(Sub *sub) {
103  if(list_.removeFirst(sub))
104  updateDualBound();
105  }
106 
108  void prune() {
109  list_.clear();
110  }
111 
113  void updateDualBound();
114 
117  double dualBound_;
118 
119  OpenSub(const OpenSub &rhs);
120  const OpenSub &operator=(const OpenSub &rhs);
121 };
122 
123 }
abacus::OpenSub::list_
ogdf::List< Sub * > list_
The list storing the open subproblems.
Definition: opensub.h:116
abacusroot.h
abacus::OpenSub::master_
Master * master_
A pointer to corresponding master of the optimization.
Definition: opensub.h:115
abacus
Definition: ILPClusterPlanarity.h:50
abacus::OpenSub::OpenSub
OpenSub(Master *master)
Creates an empty list of open subproblems.
Definition: opensub.h:65
abacus::OpenSub::dualBound_
double dualBound_
The dual bound of all open subproblems.
Definition: opensub.h:117
abacus::OpenSub::remove
void remove(Sub *sub)
Removes subproblem from the set of open subproblems.
Definition: opensub.h:102
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
abacus::OpenSub
Maintains open subproblems.
Definition: opensub.h:49
abacus::OpenSub::empty
bool empty() const
Returns true if there is no subproblem in the set of open subproblems, false otherwise.
Definition: opensub.h:73
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::OpenSub::prune
void prune()
Removes all elements from the set of opens subproblems.
Definition: opensub.h:108
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:68
abacus::Master
The master of the optimization.
Definition: master.h:69