Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PlanRepLight.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/planarity/PlanRep.h>
35 
36 
37 namespace ogdf {
38 
39 
41 
44 class PlanRepLight : public GraphCopy
45 {
46  const CCsInfo &m_ccInfo;
47  const PlanRep &m_pr;
48 
51 
52 public:
54  PlanRepLight(const PlanRep &pr);
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 
77  EdgeType typeOf(edge e) const {
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 }
edge e(int i) const
Returns the original edge with index i.
Definition: PlanRepLight.h:66
EdgeType typeOrig(edge e) const
Returns the type of original edge e.
Definition: PlanRep.h:554
EdgeArray< edge > m_eAuxCopy
Definition: PlanRepLight.h:50
PlanRepLight(const PlanRep &pr)
Creates a light-weight planarized representation.
const CCsInfo & m_ccInfo
Definition: PlanRepLight.h:46
Declaration of a base class for planar representations of graphs and cluster graphs.
int currentCC() const
Returns the index of the current connected component.
Definition: PlanRepLight.h:60
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:44
EdgeType typeOrig(edge eOrig) const
Definition: PlanRepLight.h:82
int stopEdge() const
Returns the index of (one past) the last edge in this connected component.
Definition: PlanRepLight.h:75
int numberOfCCs() const
Returns the number of connected components in the original graph.
Definition: PlanRepLight.h:57
EdgeArray< edge > m_eOrig
The corresponding edge in the original graph.
Definition: GraphCopy.h:254
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:538
void initCC(int cc)
Initializes the planarized representation for connected component cc.
Class for the representation of edges.
Definition: Graph_d.h:292
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:249
Class for the representation of nodes.
Definition: Graph_d.h:169
node v(int i) const
Returns the original node with index i.
Definition: PlanRepLight.h:69
EdgeType typeOf(edge e) const
Definition: PlanRepLight.h:77
const CCsInfo & ccInfo() const
Returns the connected component info structure.
Definition: PlanRepLight.h:63
The namespace for all OGDF objects.
int startEdge() const
Returns the index of the first edge in this connected component.
Definition: PlanRepLight.h:72
const PlanRep & m_pr
Definition: PlanRepLight.h:47
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:59