Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PlanRepLight.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
37
38namespace ogdf {
39
40
42
45class PlanRepLight : public GraphCopy {
47 const PlanRep& m_pr;
48
51
52public:
55
57 int numberOfCCs() const { return m_ccInfo.numberOfCCs(); }
58
60 int currentCC() const { return m_currentCC; }
61
63 const CCsInfo& ccInfo() const { return m_ccInfo; }
64
66 edge e(int i) const { return m_ccInfo.e(i); }
67
69 node v(int i) const { return m_ccInfo.v(i); }
70
72 int startEdge() const { return m_ccInfo.startEdge(m_currentCC); }
73
75 int stopEdge() const { return m_ccInfo.stopEdge(m_currentCC); }
76
78 edge eOrig = m_eOrig[e];
79 return (eOrig != nullptr) ? typeOrig(eOrig) : Graph::EdgeType::association;
80 }
81
82 EdgeType typeOrig(edge eOrig) const { return m_pr.typeOrig(eOrig); }
83
85 void initCC(int cc);
86};
87
88}
Includes declaration of graph class.
Declaration of graph copy classes.
Declaration of a base class for planar representations of graphs and cluster graphs.
Class for the representation of edges.
Definition Graph_d.h:364
Info structure for maintaining connected components.
Definition Graph_d.h:1896
edge e(int i) const
Returns the edge with index i.
Definition Graph_d.h:1948
int numberOfCCs() const
Returns the number of connected components.
Definition Graph_d.h:1916
node v(int i) const
Returns the node with index i.
Definition Graph_d.h:1945
int stopEdge(int cc) const
Returns the index of (one past) the last edge in connected component cc.
Definition Graph_d.h:1942
int startEdge(int cc) const
Returns the index of the first edge in connected component cc.
Definition Graph_d.h:1939
EdgeArray< edge > m_eOrig
The corresponding edge in the original graph.
Definition GraphCopy.h:54
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:390
EdgeType
The type of edges (only used in derived classes).
Definition Graph_d.h:906
Class for the representation of nodes.
Definition Graph_d.h:241
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
EdgeType typeOrig(edge e) const
Returns the type of original edge e.
Definition PlanRep.h:527
Light-weight version of a planarized representation, associated with a PlanRep.
const CCsInfo & ccInfo() const
Returns the connected component info structure.
PlanRepLight(const PlanRep &pr)
Creates a light-weight planarized representation.
EdgeArray< edge > m_eAuxCopy
int numberOfCCs() const
Returns the number of connected components in the original graph.
edge e(int i) const
Returns the original edge with index i.
int currentCC() const
Returns the index of the current connected component.
node v(int i) const
Returns the original node with index i.
void initCC(int cc)
Initializes the planarized representation for connected component cc.
const CCsInfo & m_ccInfo
const PlanRep & m_pr
EdgeType typeOf(edge e) const
EdgeType typeOrig(edge eOrig) const
int startEdge() const
Returns the index of the first edge in this connected component.
int stopEdge() const
Returns the index of (one past) the last edge in this connected component.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
The namespace for all OGDF objects.