Loading [MathJax]/extensions/tex2jax.js

Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Hierarchy.h
Go to the documentation of this file.
1
32#pragma once
33
36
37namespace ogdf {
38
40
44 friend class LayerBasedUPRLayout;
45
49
50public:
53
55 Hierarchy(const Graph& G, const NodeArray<int>& rank);
56
57 // destruction
59
60 void createEmpty(const Graph& G);
61 void initByNodes(const List<node>& nodes, EdgeArray<edge>& eCopy, const NodeArray<int>& rank);
62
64 operator const GraphCopy&() const { return m_GC; }
65
67 int rank(node v) const { return m_rank[v]; }
68
69 int maxRank() const { return m_size.high(); }
70
71 int size(int i) const { return m_size[i]; }
72
73 bool isLongEdgeDummy(node v) const { return m_GC.isDummy(v) && v->outdeg() == 1; }
74
75private:
76 void doInit(const NodeArray<int>& rank);
77};
78
79}
Declaration and implementation of EdgeArray class.
Declaration of graph copy classes.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
INDEX high() const
Returns the maximal array index.
Definition Array.h:294
Dynamic arrays indexed with edges.
Definition EdgeArray.h:125
Copies of graphs supporting edge splitting.
Definition GraphCopy.h:254
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
Definition GraphCopy.h:380
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Representation of proper hierarchies used by Sugiyama-layout.
Definition Hierarchy.h:43
NodeArray< int > m_rank
The rank (level) of a node.
Definition Hierarchy.h:47
void initByNodes(const List< node > &nodes, EdgeArray< edge > &eCopy, const NodeArray< int > &rank)
Hierarchy(const Graph &G, const NodeArray< int > &rank)
Creates an hierarchy of graph G with node ranks rank.
int maxRank() const
Definition Hierarchy.h:69
bool isLongEdgeDummy(node v) const
Definition Hierarchy.h:73
int rank(node v) const
Returns the rank (level) of node v.
Definition Hierarchy.h:67
int size(int i) const
Definition Hierarchy.h:71
Hierarchy()
Creates an empty hierarchy.
Definition Hierarchy.h:52
Array< int > m_size
Definition Hierarchy.h:48
void doInit(const NodeArray< int > &rank)
void createEmpty(const Graph &G)
GraphCopy m_GC
The graph copy representing the topology of the proper hierarchy.
Definition Hierarchy.h:46
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
int outdeg() const
Returns the outdegree of the node.
Definition Graph_d.h:217
#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.