Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EdgeStandardRep.h
Go to the documentation of this file.
1
39#pragma once
40
42#include <ogdf/basic/Graph_d.h>
47
48namespace ogdf {
49
51enum class EdgeStandardType {
55 clique = 0x0001,
60 star = 0x0002,
65 tree = 0x0003
66};
67
70private:
73
76
79
82
85
88
91
94
95public:
98
101
104
106 void clear();
107
109 const Hypergraph& hypergraph() const { return *m_hypergraph; }
110
112 const Graph& constGraph() const { return m_graphRep; }
113
115 EdgeStandardType type() const { return m_type; }
116
118 node nodeMap(hypernode v) { return m_nodeMap[v]; }
119
121 hypernode hypernodeMap(node v) { return m_hypernodeMap[v]; }
122
124 const List<edge>& edgeMap(hyperedge e) { return m_edgeMap[e]; }
125
127 hyperedge hyperedgeMap(edge e) { return m_hyperedgeMap[e]; }
128
130 const List<node>& dummyNodes() const { return m_dummyNodes; }
131
132protected:
134 virtual void hypernodeDeleted(hypernode v) override;
135
137 virtual void hypernodeAdded(hypernode v) override;
138
140 virtual void hyperedgeDeleted(hyperedge e) override;
141
143 virtual void hyperedgeAdded(hyperedge e) override;
144
146 virtual void cleared() override;
147
148private:
150
152
154
155 void hyperedgeToTree(hyperedge e, int degree);
156
158
160};
161
162}
Declaration and implementation of EdgeArray class.
Pure declaration header, find template implementation in Graph.h.
Declaration and a partial implementation of a Hypergraph class partly based on the original classes f...
Declaration and implementation of hyperraph array classes based on Node/EdgeArray classes written by ...
Abstract base class for observers on hypergraphs, that need to be informed about hypergraph changes (...
Declaration and implementation of NodeArray class.
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Class for the representation of edges.
Definition Graph_d.h:300
Edge standard representation of hypergraphs.
HyperedgeArray< List< edge > > m_edgeMap
The map from representation hyperedge to edges.
NodeArray< hypernode > m_hypernodeMap
The map from representation nodes to hypernodes.
void hyperedgeToClique(hyperedge e)
EdgeStandardType type() const
Returns the type of edge standard representation.
EdgeStandardRep(const Hypergraph &pH, EdgeStandardType pType)
Creates an edge standard rep. of a given pType associated with pH.
virtual void hypernodeAdded(hypernode v) override
Hypernode addition reaction.
EdgeArray< hyperedge > m_hyperedgeMap
The map from representation edge to hyperedges.
hypernode hypernodeMap(node v)
Returns the hypernode associated with the node (if any).
const List< edge > & edgeMap(hyperedge e)
Returns the list of edges associated with the hyperedge.
node nodeMap(hypernode v)
Returns the node associated with the hypernode.
List< node > m_dummyNodes
The list of all newly created nodes.
const Hypergraph * m_hypergraph
The reference to the original hypergraph.
HypernodeArray< node > m_nodeMap
The map from representation hypernodes to nodes.
virtual void hyperedgeAdded(hyperedge e) override
Hyperedge addition reaction.
const Graph & constGraph() const
Returns a reference to the representation graph.
Graph m_graphRep
Edge standard representation of the hypergraph.
const Hypergraph & hypergraph() const
Conversion to original hypergraph reference.
void clear()
Clears all cluster data.
virtual void hyperedgeDeleted(hyperedge e) override
Hyperedge removal reaction.
EdgeStandardRep()
Creates an edge standard representation.
virtual void cleared() override
Hypergraph clean-up reaction.
hyperedge hyperedgeMap(edge e)
Returns the hyperedge associated with the edge.
EdgeStandardType m_type
The type of edge standard representation.
virtual void hypernodeDeleted(hypernode v) override
Hypernode removal reaction.
virtual ~EdgeStandardRep()
Destructor.
const List< node > & dummyNodes() const
Returns the list of dummy nodes.
void hyperedgeToTree(hyperedge e, int degree)
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Dynamic arrays indexed with nodes.
Class for the representation of hyperedges.
Definition Hypergraph.h:135
Dynamic arrays indexed with hypernodes.
Class for the representation of hypernodes.
Definition Hypergraph.h:215
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Dynamic arrays indexed with nodes.
Definition NodeArray.h:125
Class for the representation of nodes.
Definition Graph_d.h:177
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
EdgeStandardType
Enumeration class of possible edge standard representations.
@ clique
no new dummy nodes are introduced, for every hyperedge e = (v_1, ..., v_l), we add a cliqie K_l conne...
@ star
for every hyperedge e = {v_1, ..., v_l} a single new dummy node v_e is introduced,...
@ tree
for every hyperedge e a minimal subcubic tree connecting all hypernodes incident with e together is a...