Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

PlanRepLight.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/planarity/PlanRep.h>
35 
36 namespace ogdf {
37 
38 
40 
43 class PlanRepLight : public GraphCopy {
44  const CCsInfo& m_ccInfo;
45  const PlanRep& m_pr;
46 
49 
50 public:
52  PlanRepLight(const PlanRep& pr);
53 
55  int numberOfCCs() const { return m_ccInfo.numberOfCCs(); }
56 
58  int currentCC() const { return m_currentCC; }
59 
61  const CCsInfo& ccInfo() const { return m_ccInfo; }
62 
64  edge e(int i) const { return m_ccInfo.e(i); }
65 
67  node v(int i) const { return m_ccInfo.v(i); }
68 
70  int startEdge() const { return m_ccInfo.startEdge(m_currentCC); }
71 
73  int stopEdge() const { return m_ccInfo.stopEdge(m_currentCC); }
74 
75  EdgeType typeOf(edge e) const {
76  edge eOrig = m_eOrig[e];
77  return (eOrig != nullptr) ? typeOrig(eOrig) : Graph::EdgeType::association;
78  }
79 
80  EdgeType typeOrig(edge eOrig) const { return m_pr.typeOrig(eOrig); }
81 
83  void initCC(int cc);
84 };
85 
86 }
ogdf::PlanRepLight::stopEdge
int stopEdge() const
Returns the index of (one past) the last edge in this connected component.
Definition: PlanRepLight.h:73
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::PlanRepLight::m_pr
const PlanRep & m_pr
Definition: PlanRepLight.h:45
ogdf::PlanRepLight::initCC
void initCC(int cc)
Initializes the planarized representation for connected component cc.
ogdf::PlanRepLight::ccInfo
const CCsInfo & ccInfo() const
Returns the connected component info structure.
Definition: PlanRepLight.h:61
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
ogdf::PlanRepLight::startEdge
int startEdge() const
Returns the index of the first edge in this connected component.
Definition: PlanRepLight.h:70
ogdf::Graph::CCsInfo::e
edge e(int i) const
Returns the edge with index i.
Definition: Graph_d.h:1952
ogdf::Graph::CCsInfo::stopEdge
int stopEdge(int cc) const
Returns the index of (one past) the last edge in connected component cc.
Definition: Graph_d.h:1946
ogdf::Graph::EdgeType
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:901
ogdf::PlanRepLight::PlanRepLight
PlanRepLight(const PlanRep &pr)
Creates a light-weight planarized representation.
ogdf::PlanRepLight::m_currentCC
int m_currentCC
Definition: PlanRepLight.h:47
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:384
ogdf::PlanRepLight
Light-weight version of a planarized representation, associated with a PlanRep.
Definition: PlanRepLight.h:43
ogdf::PlanRepLight::e
edge e(int i) const
Returns the original edge with index i.
Definition: PlanRepLight.h:64
ogdf::PlanRepLight::m_ccInfo
const CCsInfo & m_ccInfo
Definition: PlanRepLight.h:44
ogdf::PlanRepLight::currentCC
int currentCC() const
Returns the index of the current connected component.
Definition: PlanRepLight.h:58
PlanRep.h
Declaration of a base class for planar representations of graphs and cluster graphs.
ogdf::Graph::CCsInfo::v
node v(int i) const
Returns the node with index i.
Definition: Graph_d.h:1949
ogdf::Graph::EdgeType::association
@ association
ogdf::PlanRepLight::typeOf
EdgeType typeOf(edge e) const
Definition: PlanRepLight.h:75
ogdf::PlanRepLight::typeOrig
EdgeType typeOrig(edge eOrig) const
Definition: PlanRepLight.h:80
ogdf::PlanRepLight::numberOfCCs
int numberOfCCs() const
Returns the number of connected components in the original graph.
Definition: PlanRepLight.h:55
ogdf::PlanRepLight::v
node v(int i) const
Returns the original node with index i.
Definition: PlanRepLight.h:67
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:356
ogdf::Graph::CCsInfo::numberOfCCs
int numberOfCCs() const
Returns the number of connected components.
Definition: Graph_d.h:1920
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::PlanRepLight::m_eAuxCopy
EdgeArray< edge > m_eAuxCopy
Definition: PlanRepLight.h:48
ogdf::PlanRep::typeOrig
EdgeType typeOrig(edge e) const
Returns the type of original edge e.
Definition: PlanRep.h:516
ogdf::Graph::CCsInfo::startEdge
int startEdge(int cc) const
Returns the index of the first edge in connected component cc.
Definition: Graph_d.h:1943
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:709
ogdf::GraphCopyBase::m_eOrig
EdgeArray< edge > m_eOrig
The corresponding edge in the original graph.
Definition: GraphCopy.h:48