|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
38 #include <unordered_map>
39 #include <unordered_set>
47 namespace matching_blossom {
68 std::unordered_set<edge>&
selfLoops(
edge ref) {
return m_refToSelfLoops[ref]; }
73 m_refToSelfLoops[ref].insert(selfLoop);
74 m_selfLoopToRef[selfLoop] = ref;
75 m_selfLoopToOtherPseudonode[selfLoop] = other;
80 auto it = m_selfLoopToOtherPseudonode.find(selfLoop);
81 if (it != m_selfLoopToOtherPseudonode.end() && it->second !=
nullptr) {
82 auto& otherRefEdges = it->second->referenceEdges;
83 auto edgeIt = otherRefEdges.m_selfLoopToRef.find(selfLoop);
84 if (edgeIt != otherRefEdges.m_selfLoopToRef.end()) {
85 otherRefEdges.m_refToSelfLoops[edgeIt->second].erase(selfLoop);
86 otherRefEdges.m_selfLoopToRef.erase(edgeIt);
87 otherRefEdges.m_selfLoopToOtherPseudonode.erase(selfLoop);
The namespace for all OGDF objects.
Dummy class for scoped iteration of a std::unordered_map.
Helper class representing a pseudonode in the Blossom algorithm.
Includes declaration of graph class.
ReferenceEdges referenceEdges
The ReferenceEdges for self loops of this pseudonode.
std::unordered_map< edge, Pseudonode * > m_selfLoopToOtherPseudonode
A mapping of all self loops to the pseudonode they previously pointed to.
Helper class to store reference edges for all self loops.
void addReference(edge ref, edge selfLoop, Pseudonode *other)
Add a self loop selfLoop which was removed because of the reference edge ref and pointed previously t...
std::unordered_map< edge, edge > m_selfLoopToRef
A mapping of all self loops to their reference edges.
ValueIteratorContainer< edge, edge > refEdges
Cycle * cycle
The odd-length cycle that this pseudonode represents.
std::unordered_set< edge > & selfLoops(edge ref)
std::unordered_map< edge, std::unordered_set< edge > > m_refToSelfLoops
A mapping of all reference edges to all self loops that were removed because of them.
node graphNode
The node in the graph that this pseudonode is linked to.
Basic declarations, included by all source files.
void removeFromOther(edge selfLoop)
Remove the given selfLoop from the reference edges of the other pseudonode.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Utility functions and classes regarding map access and iteration.
Class for the representation of edges.
Class for the representation of nodes.