Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::PlanRepExpansion Class Reference

Planarized representations (of a connected component) of a graph. More...

#include <ogdf/planarity/PlanRepExpansion.h>

+ Inheritance diagram for ogdf::PlanRepExpansion:

Classes

struct  Crossing
 
class  NodeSplit
 Representation of a node split in a planarized expansion. More...
 

Public Types

using nodeSplit = PlanRepExpansion::NodeSplit *
 Pointer to a node split.
 
- Public Types inherited from ogdf::Graph
enum class  EdgeType { association = 0 , generalization = 1 , dependency = 2 }
 The type of edges (only used in derived classes). More...
 
enum class  NodeType { vertex = 0 , dummy = 1 , generalizationMerger = 2 , generalizationExpander = 3 , highDegreeExpander = 4 , lowDegreeExpander = 5 , associationClass = 6 }
 The type of nodes. More...
 
using node_iterator = internal::GraphIterator< node >
 Provides a bidirectional iterator to a node in a graph.
 
using edge_iterator = internal::GraphIterator< edge >
 Provides a bidirectional iterator to an edge in a graph.
 
using adjEntry_iterator = internal::GraphIterator< adjEntry >
 Provides a bidirectional iterator to an entry in an adjacency list.
 

Public Member Functions

 PlanRepExpansion (const Graph &G)
 Creates a planarized expansion of graph G.
 
 PlanRepExpansion (const Graph &G, const List< node > &splittableNodes)
 Creates a planarized expansion of graph G with given splittable nodes.
 
 ~PlanRepExpansion ()
 
Acess methods
const Graphoriginal () const
 Returns a reference to the original graph.
 
node original (node v) const
 Returns the original node of v, or 0 if v is a dummy.
 
const List< node > & expansion (node vOrig) const
 Returns the list of copy nodes of vOrig.
 
node copy (node vOrig) const
 Returns the first copy node of vOrig.
 
edge originalEdge (edge e) const
 Returns the original edge of e, or 0 if e has none (e.g., e belongs to a node split).
 
const List< edge > & chain (edge eOrig) const
 Returns the insertion path of edge eOrig.
 
edge copy (edge eOrig) const
 Returns the first edge in eOrig's insertion path.
 
bool splittable (node v) const
 Returns true iff v is splittable.
 
bool splittableOrig (node vOrig) const
 Returns true iff vOrig is splittable.
 
NodeSplitnodeSplitOf (edge e) const
 Returns the node split associated with e, or 0 if none (e.g., e belongs to an original edge).
 
int numberOfNodeSplits () const
 Returns the number of node splits.
 
int numberOfSplittedNodes () const
 
List< NodeSplit > & nodeSplits ()
 Returns the list of node splits.
 
List< edge > & setOrigs (edge e, edge &eOrig, nodeSplit &ns)
 Sets the original edge and corresponding node split of e and returns the corresponding insertion path.
 
ListConstIterator< edgeposition (edge e) const
 
bool isPseudoCrossing (node v) const
 
int computeNumberOfCrossings () const
 Computes the number of crossings.
 
Processing connected components
int numberOfCCs () const
 Returns the number of connected components in the original graph.
 
int currentCC () const
 Returns the index of the current connected component (-1 if not yet initialized).
 
const List< node > & nodesInCC (int i) const
 Returns the list of (original) nodes in connected component i.
 
const List< node > & nodesInCC () const
 Returns the list of (original) nodes in the current connected component.
 
void initCC (int i)
 Initializes the planarized representation for connected component i.
 
Update operations
edge split (edge e) override
 Splits edge e into two edges introducing a new node.
 
void unsplit (edge eIn, edge eOut) override
 Undoes a split operation.
 
virtual void delEdge (edge e) override
 Removes edge e from the planarized expansion.
 
bool embed ()
 Embeds the planarized expansion; returns true iff it is planar.
 
void insertEdgePath (edge eOrig, nodeSplit ns, node vStart, node vEnd, List< Crossing > &eip, edge eSrc, edge eTgt)
 
void insertEdgePathEmbedded (edge eOrig, nodeSplit ns, CombinatorialEmbedding &E, const List< Tuple2< adjEntry, adjEntry > > &crossedEdges)
 Inserts an edge or a node split according to insertion path crossedEdges.
 
void removeEdgePathEmbedded (CombinatorialEmbedding &E, edge eOrig, nodeSplit ns, FaceSet< false > &newFaces, NodeSet< false > &mergedNodes, node &oldSrc, node &oldTgt)
 Removes the insertion path of eOrig or ns.
 
void removeEdgePath (edge eOrig, nodeSplit ns, node &oldSrc, node &oldTgt)
 Removes the insertion path of eOrig or ns.
 
void contractSplit (nodeSplit ns, CombinatorialEmbedding &E)
 Removes an (unneccessary) node split consisting of a single edge.
 
void contractSplit (nodeSplit ns)
 Removes an (unneccessary) node split consisting of a single edge.
 
edge unsplitExpandNode (node u, edge eContract, edge eExpand, CombinatorialEmbedding &E)
 Unsplits a superfluous expansion node of degree 2.
 
edge unsplitExpandNode (node u, edge eContract, edge eExpand)
 Unsplits a superfluous expansion node of degree 2.
 
edge enlargeSplit (node v, edge e, CombinatorialEmbedding &E)
 Splits edge e and introduces a new node split starting at v.
 
edge enlargeSplit (node v, edge e)
 Splits edge e and introduces a new node split starting at v.
 
edge splitNodeSplit (edge e, CombinatorialEmbedding &E)
 Introduces a new node split by splitting an exisiting node split.
 
edge splitNodeSplit (edge e)
 Introduces a new node split by splitting an exisiting node split.
 
void removeSelfLoop (edge e, CombinatorialEmbedding &E)
 Removes a self-loop e = (u,u).
 
void removeSelfLoop (edge e)
 
PlanRepExpansion::nodeSplit convertDummy (node u, node vOrig, PlanRepExpansion::nodeSplit ns)
 Converts a dummy node u to a copy of an original node vOrig.
 
edge separateDummy (adjEntry adj_1, adjEntry adj_2, node vStraight, bool isSrc)
 
void resolvePseudoCrossing (node v)
 
- Public Member Functions inherited from ogdf::Graph
 Graph ()
 Constructs an empty graph.
 
 Graph (const Graph &G)
 Constructs a graph that is a copy of G.
 
virtual ~Graph ()
 Destructor.
 
bool empty () const
 Returns true iff the graph is empty, i.e., contains no nodes.
 
int numberOfNodes () const
 Returns the number of nodes in the graph.
 
int numberOfEdges () const
 Returns the number of edges in the graph.
 
int maxNodeIndex () const
 Returns the largest used node index.
 
int maxEdgeIndex () const
 Returns the largest used edge index.
 
int maxAdjEntryIndex () const
 Returns the largest used adjEntry index.
 
int nodeArrayTableSize () const
 Returns the table size of node arrays associated with this graph.
 
int edgeArrayTableSize () const
 Returns the table size of edge arrays associated with this graph.
 
int adjEntryArrayTableSize () const
 Returns the table size of adjEntry arrays associated with this graph.
 
node firstNode () const
 Returns the first node in the list of all nodes.
 
node lastNode () const
 Returns the last node in the list of all nodes.
 
edge firstEdge () const
 Returns the first edge in the list of all edges.
 
edge lastEdge () const
 Returns the last edge in the list of all edges.
 
node chooseNode (std::function< bool(node)> includeNode=[](node) { return true;}, bool isFastTest=true) const
 Returns a random node.
 
edge chooseEdge (std::function< bool(edge)> includeEdge=[](edge) { return true;}, bool isFastTest=true) const
 Returns a random edge.
 
template<class CONTAINER >
void allNodes (CONTAINER &nodeContainer) const
 Returns a container with all nodes of the graph.
 
template<class CONTAINER >
void allEdges (CONTAINER &edgeContainer) const
 Returns a container with all edges of the graph.
 
node newNode ()
 Creates a new node and returns it.
 
node newNode (int index)
 Creates a new node with predefined index and returns it.
 
edge newEdge (node v, node w)
 Creates a new edge (v,w) and returns it.
 
edge newEdge (node v, node w, int index)
 Creates a new edge (v,w) with predefined index and returns it.
 
edge newEdge (adjEntry adjSrc, adjEntry adjTgt, Direction dir=Direction::after)
 Creates a new edge at predefined positions in the adjacency lists.
 
edge newEdge (node v, adjEntry adjTgt)
 Creates a new edge at predefined positions in the adjacency lists.
 
edge newEdge (adjEntry adjSrc, node w)
 Creates a new edge at predefined positions in the adjacency lists.
 
virtual void delNode (node v)
 Removes node v and all incident edges from the graph.
 
virtual void clear ()
 Removes all nodes and all edges from the graph.
 
void insert (const Graph &G, NodeArray< node > &nodeMap)
 Inserts Graph G as a subgraph into this Graph.
 
void insert (const Graph &G)
 Inserts Graph G as a subgraph into this Graph.
 
void unsplit (node u)
 Undoes a split operation.
 
node splitNode (adjEntry adjStartLeft, adjEntry adjStartRight)
 Splits a node while preserving the order of adjacency entries.
 
node contract (edge e, bool keepSelfLoops=false)
 Contracts edge e while preserving the order of adjacency entries.
 
void move (edge e, adjEntry adjSrc, Direction dirSrc, adjEntry adjTgt, Direction dirTgt)
 Moves edge e to a different adjacency list.
 
void moveTarget (edge e, node w)
 Moves the target node of edge e to node w.
 
void moveTarget (edge e, adjEntry adjTgt, Direction dir)
 Moves the target node of edge e to a specific position in an adjacency list.
 
void moveSource (edge e, node w)
 Moves the source node of edge e to node w.
 
void moveSource (edge e, adjEntry adjSrc, Direction dir)
 Moves the source node of edge e to a specific position in an adjacency list.
 
edge searchEdge (node v, node w, bool directed=false) const
 Searches and returns an edge connecting nodes v and w in time O( min(deg(v ), deg(w ))).
 
void reverseEdge (edge e)
 Reverses the edge e, i.e., exchanges source and target node.
 
void reverseAllEdges ()
 Reverses all edges in the graph.
 
template<class NODELIST >
void collapse (NODELIST &nodesToCollapse)
 Collapses all nodes in the list nodesToCollapse to the first node in the list.
 
template<class ADJ_ENTRY_LIST >
void sort (node v, const ADJ_ENTRY_LIST &newOrder)
 Sorts the adjacency list of node v according to newOrder.
 
void reverseAdjEdges (node v)
 Reverses the adjacency list of v.
 
void moveAdj (adjEntry adjMove, Direction dir, adjEntry adjPos)
 Moves adjacency entry adjMove before or after adjPos.
 
void moveAdjAfter (adjEntry adjMove, adjEntry adjAfter)
 Moves adjacency entry adjMove after adjAfter.
 
void moveAdjBefore (adjEntry adjMove, adjEntry adjBefore)
 Moves adjacency entry adjMove before adjBefore.
 
void reverseAdjEdges ()
 Reverses all adjacency lists.
 
void swapAdjEdges (adjEntry adj1, adjEntry adj2)
 Exchanges two entries in an adjacency list.
 
int genus () const
 Returns the genus of the graph's embedding.
 
bool representsCombEmbedding () const
 Returns true iff the graph represents a combinatorial embedding.
 
ListIterator< NodeArrayBase * > registerArray (NodeArrayBase *pNodeArray) const
 Registers a node array.
 
ListIterator< EdgeArrayBase * > registerArray (EdgeArrayBase *pEdgeArray) const
 Registers an edge array.
 
ListIterator< AdjEntryArrayBase * > registerArray (AdjEntryArrayBase *pAdjArray) const
 Registers an adjEntry array.
 
ListIterator< GraphObserver * > registerStructure (GraphObserver *pStructure) const
 Registers a graph observer (e.g. a ClusterGraph).
 
void unregisterArray (ListIterator< NodeArrayBase * > it) const
 Unregisters a node array.
 
void unregisterArray (ListIterator< EdgeArrayBase * > it) const
 Unregisters an edge array.
 
void unregisterArray (ListIterator< AdjEntryArrayBase * > it) const
 Unregisters an adjEntry array.
 
void unregisterStructure (ListIterator< GraphObserver * > it) const
 Unregisters a graph observer.
 
template<class ArrayBase >
void moveRegisterArray (ListIterator< ArrayBase * > it, ArrayBase *pArray) const
 Move the registration it of an graph element array to pArray (used with move semantics for graph element arrays).
 
void resetEdgeIdCount (int maxId)
 Resets the edge id count to maxId.
 
Graphoperator= (const Graph &G)
 Assignment operator.
 

Private Member Functions

void doInit (const Graph &G, const List< node > &splittableNodes)
 
void prepareNodeSplit (const SList< adjEntry > &partitionLeft, adjEntry &adjLeft, adjEntry &adjRight)
 

Private Attributes

int m_currentCC
 The index of the current component.
 
EdgeArray< edgem_eAuxCopy
 
EdgeArray< List< edge > > m_eCopy
 The corresponding list of edges in the graph copy.
 
EdgeArray< ListIterator< edge > > m_eIterator
 The position of copy edge in the list.
 
EdgeArray< NodeSplit * > m_eNodeSplit
 
EdgeArray< edgem_eOrig
 The corresponding edge in the original graph.
 
Array< List< node > > m_nodesInCC
 The list of original nodes in each component.
 
List< NodeSplitm_nodeSplits
 
int m_numCC
 The number of components in the original graph.
 
const Graphm_pGraph
 The original graph.
 
NodeArray< boolm_splittable
 
NodeArray< boolm_splittableOrig
 
NodeArray< List< node > > m_vCopy
 The corresponding list of nodes in the graph copy.
 
NodeArray< ListIterator< node > > m_vIterator
 The position of copy node in the list.
 
NodeArray< nodem_vOrig
 The corresponding node in the original graph.
 

Additional Inherited Members

- Public Attributes inherited from ogdf::Graph
internal::GraphObjectContainer< NodeElementnodes
 The container containing all node objects.
 
internal::GraphObjectContainer< EdgeElementedges
 The container containing all edge objects.
 
- Protected Member Functions inherited from ogdf::Graph
void assign (const Graph &G, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 
void construct (const Graph &G, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 
void constructInitByActiveNodes (const List< node > &nodeList, const NodeArray< bool > &activeNodes, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 
void constructInitByCC (const CCsInfo &info, int cc, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 Constructs a copy of connected component cc in info.
 
void constructInitByNodes (const Graph &G, const List< node > &nodeList, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 Constructs a copy of the subgraph of G induced by nodeList.
 

Detailed Description

Planarized representations (of a connected component) of a graph.

Maintains types of edges (generalization, association) and nodes, and the connected components of the graph.

Definition at line 52 of file PlanRepExpansion.h.

Member Typedef Documentation

◆ nodeSplit

Pointer to a node split.

Definition at line 102 of file PlanRepExpansion.h.

Constructor & Destructor Documentation

◆ PlanRepExpansion() [1/2]

ogdf::PlanRepExpansion::PlanRepExpansion ( const Graph G)

Creates a planarized expansion of graph G.

All nodes are allowed to be split.

◆ PlanRepExpansion() [2/2]

ogdf::PlanRepExpansion::PlanRepExpansion ( const Graph G,
const List< node > &  splittableNodes 
)

Creates a planarized expansion of graph G with given splittable nodes.

Only the node in splittableNodes are allowed to be split.

Parameters
Gis the original graph of this planarized expansion.
splittableNodescontains all the nodes in G that are splittable.

◆ ~PlanRepExpansion()

ogdf::PlanRepExpansion::~PlanRepExpansion ( )
inline

Definition at line 121 of file PlanRepExpansion.h.

Member Function Documentation

◆ chain()

const List< edge > & ogdf::PlanRepExpansion::chain ( edge  eOrig) const
inline

Returns the insertion path of edge eOrig.

Definition at line 144 of file PlanRepExpansion.h.

◆ computeNumberOfCrossings()

int ogdf::PlanRepExpansion::computeNumberOfCrossings ( ) const

Computes the number of crossings.

◆ contractSplit() [1/2]

void ogdf::PlanRepExpansion::contractSplit ( nodeSplit  ns)

Removes an (unneccessary) node split consisting of a single edge.

Nodes splits consisting of a single edge are superfluous and canbe removed by contracting the respective edge.

Parameters
nsis the node split to be removed.

◆ contractSplit() [2/2]

void ogdf::PlanRepExpansion::contractSplit ( nodeSplit  ns,
CombinatorialEmbedding E 
)

Removes an (unneccessary) node split consisting of a single edge.

Nodes splits consisting of a single edge are superfluous and canbe removed by contracting the respective edge.

Parameters
nsis the node split to be removed.
Eis an embedding of the planarized expansion.

◆ convertDummy()

PlanRepExpansion::nodeSplit ogdf::PlanRepExpansion::convertDummy ( node  u,
node  vOrig,
PlanRepExpansion::nodeSplit  ns 
)

Converts a dummy node u to a copy of an original node vOrig.

This method is used if two copy nodes x and y of the same original node vOrig can be connected by converting a dummy node u into a copy node of vOrig, since an insertion path starting (or ending) at x crosses an insertion path starting (or ending) at y.

Parameters
uis a dummy node in the planarized expansion.
vOrigis an original node.
nsis a node split that can be reused for connecting x with u.

◆ copy() [1/2]

edge ogdf::PlanRepExpansion::copy ( edge  eOrig) const
inline

Returns the first edge in eOrig's insertion path.

Definition at line 147 of file PlanRepExpansion.h.

◆ copy() [2/2]

node ogdf::PlanRepExpansion::copy ( node  vOrig) const
inline

Returns the first copy node of vOrig.

Definition at line 138 of file PlanRepExpansion.h.

◆ currentCC()

int ogdf::PlanRepExpansion::currentCC ( ) const
inline

Returns the index of the current connected component (-1 if not yet initialized).

Definition at line 199 of file PlanRepExpansion.h.

◆ delEdge()

virtual void ogdf::PlanRepExpansion::delEdge ( edge  e)
overridevirtual

Removes edge e from the planarized expansion.

Reimplemented from ogdf::Graph.

◆ doInit()

void ogdf::PlanRepExpansion::doInit ( const Graph G,
const List< node > &  splittableNodes 
)
private

◆ embed()

bool ogdf::PlanRepExpansion::embed ( )

Embeds the planarized expansion; returns true iff it is planar.

◆ enlargeSplit() [1/2]

edge ogdf::PlanRepExpansion::enlargeSplit ( node  v,
edge  e 
)

Splits edge e and introduces a new node split starting at v.

Parameters
vis a node in the planarized expansion; the expansion of v's original node is enlarged.
eis the edge to be split; the insertion path of e's original edge must start or end at v.
Returns
the newly created edge; the node resulting from splitting e is the target node of this edge.

◆ enlargeSplit() [2/2]

edge ogdf::PlanRepExpansion::enlargeSplit ( node  v,
edge  e,
CombinatorialEmbedding E 
)

Splits edge e and introduces a new node split starting at v.

Parameters
vis a node in the planarized expansion; the expansion of v's original node is enlarged.
eis the edge to be split; the insertion path of e's original edge must start or end at v.
Eis an embedding of the planarized expansion.
Returns
the newly created edge; the node resulting from splitting e is the target node of this edge.

◆ expansion()

const List< node > & ogdf::PlanRepExpansion::expansion ( node  vOrig) const
inline

Returns the list of copy nodes of vOrig.

Definition at line 135 of file PlanRepExpansion.h.

◆ initCC()

void ogdf::PlanRepExpansion::initCC ( int  i)

Initializes the planarized representation for connected component i.

This initialization is always required. After performing this initialization, the planarized representation represents a copy of the i-th connected component of the original graph, where connected components are numbered 0,1,2,...

◆ insertEdgePath()

void ogdf::PlanRepExpansion::insertEdgePath ( edge  eOrig,
nodeSplit  ns,
node  vStart,
node  vEnd,
List< Crossing > &  eip,
edge  eSrc,
edge  eTgt 
)

◆ insertEdgePathEmbedded()

void ogdf::PlanRepExpansion::insertEdgePathEmbedded ( edge  eOrig,
nodeSplit  ns,
CombinatorialEmbedding E,
const List< Tuple2< adjEntry, adjEntry > > &  crossedEdges 
)

Inserts an edge or a node split according to insertion path crossedEdges.

If eOrig is not 0, a new insertion path for eOrig is inserted; otherwise, a new insertion path for node split ns is inserted.

Parameters
eOrigis an original edge in the graph (or 0).
nsis a node split in the planarized expansion.
Eis an embedding of the planarized expansion.
crossedEdgesdefines the insertion path.
Precondition
Not both eOrig and ns may be 0.
See also
GraphCopy::insertEdgePathEmbedded() for a specification of crossedEdges.

◆ isPseudoCrossing()

bool ogdf::PlanRepExpansion::isPseudoCrossing ( node  v) const

◆ nodesInCC() [1/2]

const List< node > & ogdf::PlanRepExpansion::nodesInCC ( ) const
inline

Returns the list of (original) nodes in the current connected component.

Definition at line 211 of file PlanRepExpansion.h.

◆ nodesInCC() [2/2]

const List< node > & ogdf::PlanRepExpansion::nodesInCC ( int  i) const
inline

Returns the list of (original) nodes in connected component i.

Note that connected components are numbered 0,1,...

Definition at line 206 of file PlanRepExpansion.h.

◆ nodeSplitOf()

NodeSplit * ogdf::PlanRepExpansion::nodeSplitOf ( edge  e) const
inline

Returns the node split associated with e, or 0 if none (e.g., e belongs to an original edge).

Definition at line 156 of file PlanRepExpansion.h.

◆ nodeSplits()

List< NodeSplit > & ogdf::PlanRepExpansion::nodeSplits ( )
inline

Returns the list of node splits.

Definition at line 164 of file PlanRepExpansion.h.

◆ numberOfCCs()

int ogdf::PlanRepExpansion::numberOfCCs ( ) const
inline

Returns the number of connected components in the original graph.

Definition at line 194 of file PlanRepExpansion.h.

◆ numberOfNodeSplits()

int ogdf::PlanRepExpansion::numberOfNodeSplits ( ) const
inline

Returns the number of node splits.

Definition at line 159 of file PlanRepExpansion.h.

◆ numberOfSplittedNodes()

int ogdf::PlanRepExpansion::numberOfSplittedNodes ( ) const

◆ original() [1/2]

const Graph & ogdf::PlanRepExpansion::original ( ) const
inline

Returns a reference to the original graph.

Definition at line 129 of file PlanRepExpansion.h.

◆ original() [2/2]

node ogdf::PlanRepExpansion::original ( node  v) const
inline

Returns the original node of v, or 0 if v is a dummy.

Definition at line 132 of file PlanRepExpansion.h.

◆ originalEdge()

edge ogdf::PlanRepExpansion::originalEdge ( edge  e) const
inline

Returns the original edge of e, or 0 if e has none (e.g., e belongs to a node split).

Definition at line 141 of file PlanRepExpansion.h.

◆ position()

ListConstIterator< edge > ogdf::PlanRepExpansion::position ( edge  e) const
inline

Definition at line 177 of file PlanRepExpansion.h.

◆ prepareNodeSplit()

void ogdf::PlanRepExpansion::prepareNodeSplit ( const SList< adjEntry > &  partitionLeft,
adjEntry adjLeft,
adjEntry adjRight 
)
private

◆ removeEdgePath()

void ogdf::PlanRepExpansion::removeEdgePath ( edge  eOrig,
nodeSplit  ns,
node oldSrc,
node oldTgt 
)

Removes the insertion path of eOrig or ns.

Parameters
eOrigis an original edge in the graph (or 0).
nsis a node split in the planarized expansion.
oldSrcis assigned the source node of the removed insertion path.
oldTgtis assigned the target node of the removed insertion path.
Precondition
Not both eOrig and ns may be 0.

◆ removeEdgePathEmbedded()

void ogdf::PlanRepExpansion::removeEdgePathEmbedded ( CombinatorialEmbedding E,
edge  eOrig,
nodeSplit  ns,
FaceSet< false > &  newFaces,
NodeSet< false > &  mergedNodes,
node oldSrc,
node oldTgt 
)

Removes the insertion path of eOrig or ns.

Parameters
Eis an embedding of the planarized expansion.
eOrigis an original edge in the graph (or 0).
nsis a node split in the planarized expansion.
newFacesis assigned the set of new faces resulting from joining faces when removing edges.
mergedNodesis assigned the set of nodes in the planarized expansion that resulted from merging (splittable) nodes.
oldSrcis assigned the source node of the removed insertion path.
oldTgtis assigned the target node of the removed insertion path.
Precondition
Not both eOrig and ns may be 0.

◆ removeSelfLoop() [1/2]

void ogdf::PlanRepExpansion::removeSelfLoop ( edge  e)

◆ removeSelfLoop() [2/2]

void ogdf::PlanRepExpansion::removeSelfLoop ( edge  e,
CombinatorialEmbedding E 
)

Removes a self-loop e = (u,u).

u must be a dummy node; hence, u has degree 2 node after removing e, and u is unsplit afterwards.

Parameters
emust be a self loop in the planarized expansion.
Eis an embedding of the planarized expansion.

◆ resolvePseudoCrossing()

void ogdf::PlanRepExpansion::resolvePseudoCrossing ( node  v)

◆ separateDummy()

edge ogdf::PlanRepExpansion::separateDummy ( adjEntry  adj_1,
adjEntry  adj_2,
node  vStraight,
bool  isSrc 
)

◆ setOrigs()

List< edge > & ogdf::PlanRepExpansion::setOrigs ( edge  e,
edge eOrig,
nodeSplit ns 
)

Sets the original edge and corresponding node split of e and returns the corresponding insertion path.

Parameters
eis an edge in the planarized expansion.
eOrigis assigned the original edge of e (or 0 if none).
nsis assigned the node split corresponding to e (or 0 if none).
Returns
a reference to the insertion path containing e; this is either the insertion path of eOrig (if this is not 0), or of ns.

◆ split()

edge ogdf::PlanRepExpansion::split ( edge  e)
overridevirtual

Splits edge e into two edges introducing a new node.

Let e=(v,w). Then, the resulting two edges are e=(v,u) and e'=(u,w), where u is a new node.

Note
The edge e is modified by this operation.
Parameters
eis the edge to be split.
Returns
The edge e'.

Reimplemented from ogdf::Graph.

◆ splitNodeSplit() [1/2]

edge ogdf::PlanRepExpansion::splitNodeSplit ( edge  e)

Introduces a new node split by splitting an exisiting node split.

Parameters
eis the edge to be split; the node split corresponding to e is split into two node splits.
Returns
the newly created edge; the node resulting from splitting e is the target node of this edge.

◆ splitNodeSplit() [2/2]

edge ogdf::PlanRepExpansion::splitNodeSplit ( edge  e,
CombinatorialEmbedding E 
)

Introduces a new node split by splitting an exisiting node split.

Parameters
eis the edge to be split; the node split corresponding to e is split into two node splits.
Eis an embedding of the planarized expansion.
Returns
the newly created edge; the node resulting from splitting e is the target node of this edge.

◆ splittable()

bool ogdf::PlanRepExpansion::splittable ( node  v) const
inline

Returns true iff v is splittable.

Definition at line 150 of file PlanRepExpansion.h.

◆ splittableOrig()

bool ogdf::PlanRepExpansion::splittableOrig ( node  vOrig) const
inline

Returns true iff vOrig is splittable.

Definition at line 153 of file PlanRepExpansion.h.

◆ unsplit()

void ogdf::PlanRepExpansion::unsplit ( edge  eIn,
edge  eOut 
)
overridevirtual

Undoes a split operation.

For two edges eIn = (x,u) and eOut = (u,y), removes node u by joining eIn and eOut. Edge eOut is removed and eIn is reused.

Precondition
eIn and eOut are the only edges incident with u and none of them is a self-loop.
Parameters
eInis the (only) incoming edge of u.
eOutis the (only) outgoing edge of u.

Reimplemented from ogdf::Graph.

◆ unsplitExpandNode() [1/2]

edge ogdf::PlanRepExpansion::unsplitExpandNode ( node  u,
edge  eContract,
edge  eExpand 
)

Unsplits a superfluous expansion node of degree 2.

Parameters
uis a node in the planarized expansion which has degree 2 and is part of the expansion of an original node.
eContractis the edge incident to u which is part of a node split; this edge gets contracted.
eExpandis the edge incident to u which belongs to the insertion path that gets enlarged.

◆ unsplitExpandNode() [2/2]

edge ogdf::PlanRepExpansion::unsplitExpandNode ( node  u,
edge  eContract,
edge  eExpand,
CombinatorialEmbedding E 
)

Unsplits a superfluous expansion node of degree 2.

Parameters
uis a node in the planarized expansion which has degree 2 and is part of the expansion of an original node.
eContractis the edge incident to u which is part of a node split; this edge gets contracted.
eExpandis the edge incident to u which belongs to the insertion path that gets enlarged.
Eis an embedding of the planarized expansion.

Member Data Documentation

◆ m_currentCC

int ogdf::PlanRepExpansion::m_currentCC
private

The index of the current component.

Definition at line 432 of file PlanRepExpansion.h.

◆ m_eAuxCopy

EdgeArray<edge> ogdf::PlanRepExpansion::m_eAuxCopy
private

Definition at line 436 of file PlanRepExpansion.h.

◆ m_eCopy

EdgeArray<List<edge> > ogdf::PlanRepExpansion::m_eCopy
private

The corresponding list of edges in the graph copy.

Definition at line 423 of file PlanRepExpansion.h.

◆ m_eIterator

EdgeArray<ListIterator<edge> > ogdf::PlanRepExpansion::m_eIterator
private

The position of copy edge in the list.

Definition at line 422 of file PlanRepExpansion.h.

◆ m_eNodeSplit

EdgeArray<NodeSplit*> ogdf::PlanRepExpansion::m_eNodeSplit
private

Definition at line 429 of file PlanRepExpansion.h.

◆ m_eOrig

EdgeArray<edge> ogdf::PlanRepExpansion::m_eOrig
private

The corresponding edge in the original graph.

Definition at line 421 of file PlanRepExpansion.h.

◆ m_nodesInCC

Array<List<node> > ogdf::PlanRepExpansion::m_nodesInCC
private

The list of original nodes in each component.

Definition at line 435 of file PlanRepExpansion.h.

◆ m_nodeSplits

List<NodeSplit> ogdf::PlanRepExpansion::m_nodeSplits
private

Definition at line 430 of file PlanRepExpansion.h.

◆ m_numCC

int ogdf::PlanRepExpansion::m_numCC
private

The number of components in the original graph.

Definition at line 433 of file PlanRepExpansion.h.

◆ m_pGraph

const Graph* ogdf::PlanRepExpansion::m_pGraph
private

The original graph.

Definition at line 419 of file PlanRepExpansion.h.

◆ m_splittable

NodeArray<bool> ogdf::PlanRepExpansion::m_splittable
private

Definition at line 427 of file PlanRepExpansion.h.

◆ m_splittableOrig

NodeArray<bool> ogdf::PlanRepExpansion::m_splittableOrig
private

Definition at line 428 of file PlanRepExpansion.h.

◆ m_vCopy

NodeArray<List<node> > ogdf::PlanRepExpansion::m_vCopy
private

The corresponding list of nodes in the graph copy.

Definition at line 425 of file PlanRepExpansion.h.

◆ m_vIterator

NodeArray<ListIterator<node> > ogdf::PlanRepExpansion::m_vIterator
private

The position of copy node in the list.

Definition at line 424 of file PlanRepExpansion.h.

◆ m_vOrig

NodeArray<node> ogdf::PlanRepExpansion::m_vOrig
private

The corresponding node in the original graph.

Definition at line 420 of file PlanRepExpansion.h.


The documentation for this class was generated from the following file: