115 return adj->
isSource() ?
f->adjSource() :
f->adjTarget();
150 return adj->
isSource() ?
f->adjSource() :
f->adjTarget();
176 node v = Graph::newNode();
177 m_vCopy[m_vOrig[v] =
vOrig] = v;
181 using Graph::newNode;
192 edge e = Graph::newEdge(m_vCopy[
eOrig->source()], m_vCopy[
eOrig->target()]);
193 m_eCopy[m_eOrig[e] =
eOrig] = e;
198 using Graph::newEdge;
326 return f->adjSource();
329 return f->adjTarget();
370 return m_eCopy[e].front()->adjSource();
372 return m_eCopy[e].back()->adjTarget();
415 node v = Graph::newNode();
416 m_vCopy[m_vOrig[v] =
vOrig] = v;
420 using Graph::newNode;
462 using Graph::newEdge;
476 void removePseudoCrossings();
484 bool hasAdjacentEdgesCrossings()
const;
495 inline bool hasNonSimpleCrossings()
const {
496 return hasAdjacentEdgesCrossings() || hasSameEdgesCrossings();
Includes declaration of dual graph class.
Declaration and implementation of EdgeArray class.
Declaration and implementation of NodeArray class.
Declaration of singly linked lists and iterators.
Class for adjacency list elements.
edge theEdge() const
Returns the edge associated with this adjacency entry.
bool isSource() const
Returns true iff this is the source adjacency entry of the corresponding edge.
bool empty() const
Returns true iff there are no elements in the array.
Combinatorial embeddings of planar graphs with modification functionality.
A dual graph including its combinatorial embedding of an embedded graph.
Dynamic arrays indexed with edges.
Class for the representation of edges.
node source() const
Returns the source node of the edge.
Info structure for maintaining connected components.
Copies of graphs supporting edge splitting.
void removeNonSimpleCrossings(SListPure< edge > &edgesToCheck, DynamicDualGraph *dualGraph=nullptr)
Removes all non-simple cossings involving edges from edgesToCheck (see hasNonSimpleCrossings() for a ...
const List< edge > & chain(edge e) const
Returns the list of edges coresponding to edge e.
NodeArray< node > m_vCopy
The corresponding node in the graph copy.
node newNode(node vOrig)
Creates a new node in the graph copy with original node vOrig.
GraphCopy(const GraphCopy &GC)
Copy constructor.
void setEdge(edge eOrig, edge eCopy)
sets eOrig to be the corresponding original edge of eCopy and vice versa
void setOriginalEmbedding()
Sets the embedding of the graph copy to the embedding of the original graph.
GraphCopy & operator=(const GraphCopy &GC)
Assignment operator.
void insertEdgePath(edge eOrig, const SList< adjEntry > &crossedEdges)
Re-inserts edge eOrig by "crossing" the edges in crossedEdges.
void removeEdgePath(edge eOrig)
Removes the complete edge path for edge eOrig.
void removeSameEdgesCrossing(adjEntry adjFirstCrossing1, adjEntry adjFirstCrossing2, adjEntry adjSecondCrossing1, adjEntry adjSecondCrossing2, DynamicDualGraph *dualGraph)
Removes the two crossings given by the adjEntries, assuming that both crossings stem from the same tw...
void init(const Graph &G)
Re-initializes the copy using the graph G.
GraphCopy()
Default constructor (does nothing!).
EdgeArray< edge > m_eOrig
The corresponding edge in the original graph.
virtual void delEdge(edge e) override
Removes edge e and clears the list of edges corresponding to e's original edge.
adjEntry copy(adjEntry adj) const
Returns the adjacency entry in the copy graph corresponding to adj.
node original(node v) const
Returns the node in the original graph corresponding to v.
bool isDummy(edge e) const
Returns true iff e has no corresponding edge in the original graph.
void insertEdgePathEmbedded(edge eOrig, CombinatorialEmbedding &E, const SList< adjEntry > &crossedEdges)
Re-inserts edge eOrig by "crossing" the edges in crossedEdges in embedding E.
EdgeArray< ListIterator< edge > > m_eIterator
The position of copy edge in the list.
edge copy(edge e) const
Returns the first edge in the list of edges coresponding to edge e.
void insertEdgePath(node srcOrig, node tgtOrig, const SList< adjEntry > &crossedEdges)
Special version (for FixedEmbeddingUpwardEdgeInserter only).
void unsplit(edge eIn, edge eOut) override
Undoes a previous split operation.
edge insertCrossing(edge &crossingEdge, edge crossedEdge, bool rightToLeft)
Inserts crossings between two copy edges.
void insertEdgePathEmbedded(edge eOrig, CombinatorialEmbedding &E, DynamicDualGraph &dual, const SList< adjEntry > &crossedEdges)
const Graph * m_pGraph
The original graph.
EdgeArray< List< edge > > m_eCopy
The corresponding list of edges in the graph copy.
void removeAdjacentEdgesCrossing(adjEntry adj1, adjEntry adj2, DynamicDualGraph *dualGraph)
Removes the crossing of the two adjacent edges adj1->theEdge() and adj2->theEdge().
void swapOriginalEdgesBetweenCrossings(adjEntry adjFirstCrossing1, adjEntry adjFirstCrossing2, adjEntry adjSecondCrossing1, adjEntry adjSecondCrossing2, DynamicDualGraph *dual=nullptr)
Swaps the original edges from adjFirstCrossing1 up to adjSecondCrossing1->theNode() with the original...
void initByNodes(const List< node > &origNodes, EdgeArray< edge > &eCopy)
Initializes the graph copy for the nodes in a component.
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
NodeArray< node > m_vOrig
The corresponding node in the original graph.
void removeEdgePathEmbedded(CombinatorialEmbedding &E, DynamicDualGraph &dual, edge eOrig)
virtual void delNode(node v) override
Removes node v and all its adjacent edges cleaning-up their corresponding lists of original edges.
GraphCopy(const Graph &G)
Creates a graph copy of G.
void removeUnnecessaryCrossing(adjEntry adjA1, adjEntry adjA2, adjEntry adjB1, adjEntry adjB2)
void removeNonSimpleCrossings(DynamicDualGraph *dualGraph=nullptr)
Removes all non-simple cossings (see hasNonSimpleCrossings() for a definition of non-simple crossings...
void removeUnnecessaryCrossing(adjEntry adj, DynamicDualGraph *dualGraph)
Removes the pseudo crossing that adj belongs to.
edge original(edge e) const
Returns the edge in the original graph corresponding to e.
void swapOriginalEdgesAtCrossing(adjEntry adjCopy1, adjEntry adjCopy2, DynamicDualGraph *dual=nullptr)
Swaps the original edges from adjCopy1 up to the common node of {adjCopy1, adjCopy2} with the origina...
void initByActiveNodes(const List< node > &nodeList, const NodeArray< bool > &activeNodes, EdgeArray< edge > &eCopy)
Initializes the graph copy for the nodes in nodeList.
node copy(node v) const
Returns the node in the graph copy corresponding to v.
const Graph & original() const
Returns a reference to the original graph.
virtual void clear() override
Removes all nodes and all edges from the graph.
void setOriginalEdgeAlongCrossings(adjEntry adjCopy1, adjEntry adjCopy2, node vCopy, edge eOrig1, edge eOrig2)
Sets the original edges from adjCopy1 up to vCopy to eOrig2, and the original edges from adjCopy2 up ...
edge newEdge(node v, adjEntry adj, edge eOrig, CombinatorialEmbedding &E)
Creates a new edge with original edge eOrig in an embedding E.
bool isReversed(edge e) const
Returns true iff edge e has been reversed.
void removeNonSimpleCrossings(node origNode, DynamicDualGraph *dualGraph=nullptr)
Removes all non-simple cossings involving edges incident to origNode (see hasNonSimpleCrossings() for...
void createEmpty(const Graph &G)
Associates the graph copy with G, but does not create any nodes or edges.
void removeEdgePathEmbedded(CombinatorialEmbedding &E, edge eOrig, FaceSet< false > &newFaces)
Removes the complete edge path for edge eOrig while preserving the embedding.
bool isReversedCopyEdge(edge e) const
Returns true iff e is reversed w.r.t.
void initGC(const GraphCopy &GC, NodeArray< node > &vCopy, EdgeArray< edge > &eCopy)
adjEntry original(adjEntry adj) const
Returns the adjacency entry in the original graph corresponding to adj.
edge newEdge(edge eOrig)
Creates a new edge (v,w) with original edge eOrig.
virtual edge split(edge e) override
Splits edge e.
void initByCC(const CCsInfo &info, int cc, EdgeArray< edge > &eCopy)
Initializes the graph copy for the nodes in component cc.
Copies of graphs with mapping between nodes and edges.
edge newEdge(edge eOrig)
Creates a new edge in the graph copy with original edge eOrig.
GraphCopySimple & operator=(const GraphCopySimple &GC)
Assignment operator.
edge original(edge e) const
Returns the edge in the original graph corresponding to e.
virtual void delEdge(edge e) override
Removes edge e.
adjEntry copy(adjEntry adj) const
Returns the adjacency entry in the graph copy corresponding to adj.
GraphCopySimple()
Constructs a GraphCopySimple associated with no graph.
GraphCopySimple(const GraphCopySimple &GC)
Copy constructor.
node copy(node v) const
Returns the node in the graph copy corresponding to v.
node newNode(node vOrig)
Creates a new node in the graph copy with original node vOrig.
GraphCopySimple(const Graph &G)
Constructs a copy of graph G.
void initGC(const GraphCopySimple &GC, NodeArray< node > &vCopy, EdgeArray< edge > &eCopy)
bool isDummy(edge e) const
Returns true iff e has no corresponding edge in the original graph.
void init(const Graph &G)
Re-initializes the copy using G.
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
NodeArray< node > m_vCopy
The corresponding node in the graph copy.
const Graph & original() const
Returns a reference to the original graph.
adjEntry original(adjEntry adj) const
Returns the adjacency entry in the original graph corresponding to adj.
virtual ~GraphCopySimple()
virtual void delNode(node v) override
Removes node v.
edge copy(edge e) const
Returns the edge in the graph copy corresponding to e.
node original(node v) const
Returns the node in the original graph corresponding to v.
void createEmpty(const Graph &G)
Re-initializes the copy using G, but does not create any nodes or edges.
EdgeArray< edge > m_eCopy
The corresponding edge in the graph copy.
NodeArray< node > m_vOrig
The corresponding node in the original graph.
const Graph * m_pGraph
The original graph.
EdgeArray< edge > m_eOrig
The corresponding edge in the original graph.
Data type for general directed graphs (adjacency list representation).
void allEdges(CONTAINER &edgeContainer) const
Returns a container with all edges of the graph.
Doubly linked lists (maintaining the length of the list).
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Singly linked lists (maintaining the length of the list).
iterator pushBack(const E &x)
Adds element x at the end of the list.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_DEPRECATED(reason)
Mark a class / member / function as deprecated.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.