Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::GlueMap< TCost > Class Template Reference

This is a helper class to make the glueing of two edges simpler. More...

#include <ogdf/planarity/NonPlanarCore.h>

Public Member Functions

 GlueMap (edge eWinner, edge eLoser, NonPlanarCore< TCost > &npc)
 A GlueMap is created from an NonPlanarCore and two core edges that ought to be glued together. More...
 
const GraphgetLoserGraph () const
 Getter for m_gLoser. More...
 
node getWinnerNodeOfLoserNode (node v) const
 Getter for m_mapV_l2w. More...
 
void mapLoserToNewWinnerEdge (edge eInLoser)
 A mapping from the eInLoser graph to a new edge in the winner graph is created. More...
 
void mapLoserToNewWinnerNode (node vInLoser)
 A mapping from the vInLoser to a new node in the winner graph is created. More...
 
void mapLoserToWinnerNode (node vInLoser, node vInWinner)
 A mapping from the vInLoser to the vInWinner is created. More...
 
void reorder (node vLoser, bool sameDirection, bool isTNodeOfPNode)
 This method reorders the adjacency order of vLoser's counterpart in the winner graph according to the AdjOrder of vLoser in the loser graph. More...
 

Protected Attributes

const edge m_eLoser
 The core edge that will be deleted. More...
 
const edge m_eWinner
 The core edge that will survive. More...
 
const Graphm_gLoser
 The graph that eLoser represents. More...
 
Graphm_gWinner
 The graph that eWinner represents. More...
 
EdgeArray< edgem_mapE_l2w
 A map from the edges of the loser graph to their new home in the winner graph. More...
 
const EdgeArray< edge > * m_mapEloser
 A map from the edges of the loser graph to the original graph, to denote the original of each node. More...
 
EdgeArray< edge > * m_mapEwinner
 A map from the edges of the winner graph to the original graph, to denote the original of each edge. More...
 
NodeArray< nodem_mapV_l2w
 A map from the nodes of the loser graph to their new home in the winner graph. More...
 
const NodeArray< node > * m_mapVloser
 A map from the nodes of the loser graph to the original graph, to denote the original of each node. More...
 
NodeArray< node > * m_mapVwinner
 A map from the nodes of the winner graph to the original graph, to denote the original of each edge. More...
 
NonPlanarCore< TCost > & m_npc
 The NonPlanarCore on which this instance operates. More...
 

Detailed Description

template<typename TCost>
class ogdf::GlueMap< TCost >

This is a helper class to make the glueing of two edges simpler.

Definition at line 362 of file NonPlanarCore.h.

Constructor & Destructor Documentation

◆ GlueMap()

template<typename TCost >
ogdf::GlueMap< TCost >::GlueMap ( edge  eWinner,
edge  eLoser,
NonPlanarCore< TCost > &  npc 
)

A GlueMap is created from an NonPlanarCore and two core edges that ought to be glued together.

It holds many mappings, mostly to the original graph of the core.

Parameters
eWinnerThis edge gets extended.
eLoserThis edge gets deleted in the end and everything it represents is transferred to eWinner.
npcThe NonPlanarCore all of this exists in.

Definition at line 1221 of file NonPlanarCore.h.

Member Function Documentation

◆ getLoserGraph()

template<typename TCost >
const Graph& ogdf::GlueMap< TCost >::getLoserGraph ( ) const
inline

Getter for m_gLoser.

Returns
the graph that loses this glueing

Definition at line 413 of file NonPlanarCore.h.

◆ getWinnerNodeOfLoserNode()

template<typename TCost >
node ogdf::GlueMap< TCost >::getWinnerNodeOfLoserNode ( node  v) const
inline

Getter for m_mapV_l2w.

Parameters
vthe loser node
Returns
the winner node

Definition at line 407 of file NonPlanarCore.h.

◆ mapLoserToNewWinnerEdge()

template<typename TCost >
void ogdf::GlueMap< TCost >::mapLoserToNewWinnerEdge ( edge  eInLoser)

A mapping from the eInLoser graph to a new edge in the winner graph is created.

Definition at line 1256 of file NonPlanarCore.h.

◆ mapLoserToNewWinnerNode()

template<typename TCost >
void ogdf::GlueMap< TCost >::mapLoserToNewWinnerNode ( node  vInLoser)

A mapping from the vInLoser to a new node in the winner graph is created.

Definition at line 1269 of file NonPlanarCore.h.

◆ mapLoserToWinnerNode()

template<typename TCost >
void ogdf::GlueMap< TCost >::mapLoserToWinnerNode ( node  vInLoser,
node  vInWinner 
)

A mapping from the vInLoser to the vInWinner is created.

Definition at line 1263 of file NonPlanarCore.h.

◆ reorder()

template<typename TCost >
void ogdf::GlueMap< TCost >::reorder ( node  vLoser,
bool  sameDirection,
bool  isTNodeOfPNode 
)

This method reorders the adjacency order of vLoser's counterpart in the winner graph according to the AdjOrder of vLoser in the loser graph.

Parameters
vLoserthe node in question
sameDirectionfalse iff this method is called while handling a P Node, for which the edges are not in the same direction.
isTNodeOfPNodetrue iff vLoser is the target node of the loser graph and the glueing process is done on a P Node.

Definition at line 1276 of file NonPlanarCore.h.

Member Data Documentation

◆ m_eLoser

template<typename TCost >
const edge ogdf::GlueMap< TCost >::m_eLoser
protected

The core edge that will be deleted.

Definition at line 421 of file NonPlanarCore.h.

◆ m_eWinner

template<typename TCost >
const edge ogdf::GlueMap< TCost >::m_eWinner
protected

The core edge that will survive.

Definition at line 419 of file NonPlanarCore.h.

◆ m_gLoser

template<typename TCost >
const Graph* ogdf::GlueMap< TCost >::m_gLoser
protected

The graph that eLoser represents.

Definition at line 425 of file NonPlanarCore.h.

◆ m_gWinner

template<typename TCost >
Graph* ogdf::GlueMap< TCost >::m_gWinner
protected

The graph that eWinner represents.

Definition at line 423 of file NonPlanarCore.h.

◆ m_mapE_l2w

template<typename TCost >
EdgeArray<edge> ogdf::GlueMap< TCost >::m_mapE_l2w
protected

A map from the edges of the loser graph to their new home in the winner graph.

Definition at line 437 of file NonPlanarCore.h.

◆ m_mapEloser

template<typename TCost >
const EdgeArray<edge>* ogdf::GlueMap< TCost >::m_mapEloser
protected

A map from the edges of the loser graph to the original graph, to denote the original of each node.

Definition at line 429 of file NonPlanarCore.h.

◆ m_mapEwinner

template<typename TCost >
EdgeArray<edge>* ogdf::GlueMap< TCost >::m_mapEwinner
protected

A map from the edges of the winner graph to the original graph, to denote the original of each edge.

Definition at line 427 of file NonPlanarCore.h.

◆ m_mapV_l2w

template<typename TCost >
NodeArray<node> ogdf::GlueMap< TCost >::m_mapV_l2w
protected

A map from the nodes of the loser graph to their new home in the winner graph.

Definition at line 435 of file NonPlanarCore.h.

◆ m_mapVloser

template<typename TCost >
const NodeArray<node>* ogdf::GlueMap< TCost >::m_mapVloser
protected

A map from the nodes of the loser graph to the original graph, to denote the original of each node.

Definition at line 433 of file NonPlanarCore.h.

◆ m_mapVwinner

template<typename TCost >
NodeArray<node>* ogdf::GlueMap< TCost >::m_mapVwinner
protected

A map from the nodes of the winner graph to the original graph, to denote the original of each edge.

Definition at line 431 of file NonPlanarCore.h.

◆ m_npc

template<typename TCost >
NonPlanarCore<TCost>& ogdf::GlueMap< TCost >::m_npc
protected

The NonPlanarCore on which this instance operates.

Definition at line 417 of file NonPlanarCore.h.


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