39#include <unordered_map>
43using PredecessorMap = std::unordered_map<node, std::unique_ptr<NodeArray<edge>>>;
189 edge primalEdge {adj->theEdge()};
190 node primalNode {adj->theNode()};
194 if (
pred1 ==
nullptr && primalNode ==
w1) {
197 if (
pred2 ==
nullptr && primalNode ==
w2) {
205 if (dualEdge ==
pred1) {
209 if (dualEdge ==
pred2) {
254 return (*m_newToOldFace)[m_dual->
primalFace(dualNode)];
Includes declaration of dual graph class.
Declaration of graph copy classes.
Class for adjacency list elements.
adjEntry faceCycleSucc() const
Returns the cyclic successor in face.
Combinatorial embeddings of planar graphs with modification functionality.
Combinatorial embeddings of planar graphs.
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
A dual graph including its combinatorial embedding of an embedded graph.
const face & primalFace(node v) const
Returns the face in the embedding of the primal graph corresponding to v.
const edge & primalEdge(edge e) const
Returns the edge in the primal graph corresponding to e.
Embedding & getPrimalEmbedding() const
Returns a reference to the combinatorial embedding of the primal graph.
const edge & dualEdge(edge e) const
Returns the edge in the dual graph corresponding to e.
Dynamic arrays indexed with edges.
Class for the representation of edges.
Orders edges such that they do not cross each other when embeddded as insertion paths.
node findLCAInInsertionPathTree(node w1, node w2, edge &parentOfLCA) const
Returns the lowest common ancestor of w1 and w2 in the insertion path tree given by m_predecessors.
const PredecessorMap & m_predecessors
Insertion path tree, given by several insertion paths.
node m_origNode
Common (original) node of compared edges.
int compare(const edge &e1, const edge &e2) const
Compares two edges as described for EdgeOrderComparer.
const DynamicDualGraph * m_dualGraph
Dual graph of m_graphCopy.
EdgeOrderComparer(node origNode, node rootDualNode, const PredecessorMap &predecessors, const GraphCopy &graphCopy, const DynamicDualGraph *dualGraph)
Creates a new EdgeOrderComparer.
node m_rootDualNode
Dual node, root of the insertion path tree.
const GraphCopy & m_graphCopy
Planarization.
Dynamic arrays indexed with faces of a combinatorial embedding.
Faces in a combinatorial embedding.
Copies of graphs supporting edge splitting.
node copy(node v) const
Returns the node in the graph copy corresponding to v.
Doubly linked lists (maintaining the length of the list).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Singly linked lists (maintaining the length of the list).
Inserts a star (a vertex and its incident edges) optimally into an embedding.
EdgeArray< edge > * m_edgeInChainToSplit
Maps each edge e originally contained in m_graphCopy to the edge in the same chain which should be sp...
~StarInserter()
Destructor.
adjEntry getAdjEntry(node primalNode, node rightDualNode, edge primalEdge, bool first)
Returns the adjEntry of primalNode whose right face is incident to primalEdge.
void transferCrossedEdges(const List< adjEntry > &crossedEdges, SList< adjEntry > &finalCrossedEdges, bool startAtSource)
Transfers the adjEntries from the List crossedEdges to the SList finalCrossedEdges such that they can...
CombinatorialEmbedding * m_combEmbedding
Embedding of m_graphCopy.
virtual void call(GraphCopy &graphCopy, DynamicDualGraph &dualGraph, node origNode, const EdgeArray< int > *pCostOrig)
Inserts the node origNode and its incident edges into graphCopy.
StarInserter()
Creates a StarInserter instance with default settings.
void updateMemberData(edge origEdge, bool startAtSource)
Update member variables, in particular m_newToOldFace and m_edgeInChainToSplit, after an edge was ins...
FaceArray< face > * m_newToOldFace
Maps new faces (created after the insertion of edge paths) to old (non-split) faces....
GraphCopy * m_graphCopy
Planarization.
void makePredsConsistent(node origNode, node optimalDualNode, PredecessorMap &predecessors)
Modify the insertion paths predecessors such that they do not cross each other anymore,...
adjEntry getCrossedAdjEntry(edge primalEdgeToSplit, node leftDualNode)
Returns the adjEntry of primalEdgeToSplit whose left face corresponds to leftDualNode.
node getOptimalDualNode(node origNode, const EdgeArray< int > *pCostOrig, PredecessorMap &predecessors)
Computes the optimal dual node to insert origNode and the insertion paths of its incident edges.
EdgeArray< edge > * m_originalEdge
Maps the parts of a chain in m_graphCopy to the respective copy edge contained in m_graphCopy before ...
edge collectAdjEntries(node w, node insertedNode, node optimalDualNode, const PredecessorMap &predecessors, List< adjEntry > &crossedEdges)
Collects adjEntries which can be passed to GraphCopy::insertEdgePathEmbedded to embed the edge insert...
DynamicDualGraph * m_dual
Dual graph of m_combEmbedding.
StarInserter & operator=(const StarInserter &inserter)
Assignment operator, copies option settings only.
adjEntry getAdjEntry(node primalNode, node rightDualNode, node otherPrimalNode)
Returns the adjEntry of primalNode whose right face corresponds to rightDualNode (if otherPrimaNode i...
void initMemberData(GraphCopy &graphCopy, DynamicDualGraph &dualGraph)
Initialize all member variables.
face oldPrimalFace(node dualNode)
Returns the primal face of dualNode which existed before any new edges were inserted.
StarInserter(const StarInserter &inserter)
Creates a StarInserter instance with the same settings as inserter.
Declarations for Comparer objects.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_AUGMENT_COMPARER(type)
Add this macro to your class to turn it into a full comparer.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
std::unordered_map< node, std::unique_ptr< NodeArray< edge > > > PredecessorMap