Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

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

Public Member Functions

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

Miscelleaneous

const Graphm_pGraph
 The original graph. More...
 
NodeArray< nodem_vOrig
 The corresponding node in the original graph. More...
 
EdgeArray< edgem_eOrig
 The corresponding edge in the original graph. More...
 
EdgeArray< ListIterator< edge > > m_eIterator
 The position of copy edge in the list. More...
 
EdgeArray< List< edge > > m_eCopy
 The corresponding list of edges in the graph copy. More...
 
NodeArray< ListIterator< node > > m_vIterator
 The position of copy node in the list. More...
 
NodeArray< List< node > > m_vCopy
 The corresponding list of nodes in the graph copy. More...
 
NodeArray< bool > m_splittable
 
NodeArray< bool > m_splittableOrig
 
EdgeArray< NodeSplit * > m_eNodeSplit
 
List< NodeSplitm_nodeSplits
 
int m_currentCC
 The index of the current component. More...
 
int m_numCC
 The number of components in the original graph. More...
 
Array< List< node > > m_nodesInCC
 The list of original nodes in each component. More...
 
EdgeArray< edgem_eAuxCopy
 
void doInit (const Graph &G, const List< node > &splittableNodes)
 
void prepareNodeSplit (const SList< adjEntry > &partitionLeft, adjEntry &adjLeft, adjEntry &adjRight)
 

Additional Inherited Members

- Public Attributes inherited from ogdf::Graph
internal::GraphObjectContainer< NodeElementnodes
 The container containing all node objects. More...
 
internal::GraphObjectContainer< EdgeElementedges
 The container containing all edge objects. More...
 
- Protected Member Functions inherited from ogdf::Graph
void construct (const Graph &G, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 
void assign (const Graph &G, NodeArray< node > &mapNode, EdgeArray< edge > &mapEdge)
 
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. More...
 
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. More...
 

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 54 of file PlanRepExpansion.h.

Member Typedef Documentation

◆ nodeSplit

Pointer to a node split.

Definition at line 106 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 125 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 149 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 152 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 143 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 205 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 140 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 221 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 214 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 161 of file PlanRepExpansion.h.

◆ nodeSplits()

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

Returns the list of node splits.

Definition at line 168 of file PlanRepExpansion.h.

◆ numberOfCCs()

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

Returns the number of connected components in the original graph.

Definition at line 198 of file PlanRepExpansion.h.

◆ numberOfNodeSplits()

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

Returns the number of node splits.

Definition at line 164 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 134 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 137 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 146 of file PlanRepExpansion.h.

◆ position()

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

Definition at line 181 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 155 of file PlanRepExpansion.h.

◆ splittableOrig()

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

Returns true iff vOrig is splittable.

Definition at line 158 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 479 of file PlanRepExpansion.h.

◆ m_eAuxCopy

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

Definition at line 483 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 470 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 469 of file PlanRepExpansion.h.

◆ m_eNodeSplit

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

Definition at line 476 of file PlanRepExpansion.h.

◆ m_eOrig

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

The corresponding edge in the original graph.

Definition at line 468 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 482 of file PlanRepExpansion.h.

◆ m_nodeSplits

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

Definition at line 477 of file PlanRepExpansion.h.

◆ m_numCC

int ogdf::PlanRepExpansion::m_numCC
private

The number of components in the original graph.

Definition at line 480 of file PlanRepExpansion.h.

◆ m_pGraph

const Graph* ogdf::PlanRepExpansion::m_pGraph
private

The original graph.

Definition at line 466 of file PlanRepExpansion.h.

◆ m_splittable

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

Definition at line 474 of file PlanRepExpansion.h.

◆ m_splittableOrig

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

Definition at line 475 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 472 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 471 of file PlanRepExpansion.h.

◆ m_vOrig

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

The corresponding node in the original graph.

Definition at line 467 of file PlanRepExpansion.h.


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