|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
82 int size()
const override {
return m_pLevel.
size(); }
85 int high()
const override {
return m_pLevel.
high(); }
88 int pos(
node v)
const override {
return m_pos[v]; }
92 return (m_direction == TraversingDir::downward) ? m_lowerAdjNodes[v] : m_upperAdjNodes[v];
97 return (dir == TraversingDir::downward) ? m_lowerAdjNodes[v] : m_upperAdjNodes[v];
102 return (m_direction == TraversingDir::downward) ? *m_pLevel[i - 1] : *m_pLevel[i + 1];
125 void permute(RNG& rng);
130 bool transpose(
node v);
132 void print(std::ostream& os)
const;
134 void buildAdjNodes(
int i);
135 void buildAdjNodes();
147 for (
int i = 0; i <
m_pLevel.high(); ++i) {
150 for (
int j = 0; j <= level.
high(); ++j) {
The namespace for all OGDF objects.
Includes declaration of graph class.
Level & operator[](int i)
Returns the i-th level.
int size() const override
Returns the number of levels.
TraversingDir direction() const
Returns the current direction of layer-by-layer sweep.
int high() const override
Returns the maximal array index (= size()-1).
INDEX high() const
Returns the maximal array index.
Representation of proper hierarchies used by Sugiyama-layout.
const Level & adjLevel(int i) const
Returns the adjacent level of level i (according to direction()).
void direction(TraversingDir dir)
Sets the current direction of layer-by-layer sweep.
void permute(INDEX l, INDEX r)
Randomly permutes the subarray with index set [l..r].
NodeArray< Array< node > > m_upperAdjNodes
(Sorted) adjacent nodes on upper level.
TraversingDir m_direction
The current direction of layer-by-layer sweep.
const Level & operator[](int i) const override
Returns the i-th level.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
int pos(node v) const override
Returns the position of node v on its level.
Array< node > m_nodes
The nodes on this level.
The parameterized class Array implements dynamic arrays of type E.
NodeArray< int > m_pos
The position of a node on its level.
const Array< node > & adjNodes(node v) const
Returns the adjacent nodes of v (according to direction()).
Array< Level * > m_pLevel
The array of all levels.
RegisteredArray for nodes, edges and adjEntries of a graph.
NodeArray< int > m_nSet
(Only used by buildAdjNodes().)
void permute()
Permutes the order of nodes on each level.
Declaration of interfaces used in Sugiyama framework.
const Hierarchy & hierarchy() const override
const Array< node > & adjNodes(node v, TraversingDir dir) const override
Returns the adjacent nodes of v.
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
NodeArray< Array< node > > m_lowerAdjNodes
(Sorted) adjacent nodes on lower level.
Declaration and implementation of Array class and Array algorithms.
void print(std::ostream &os, const Array< E, INDEX > &a, char delim=' ')
Prints array a to output stream os using delimiter delim.
INDEX size() const
Returns the size (number of elements) of the array.
Representation of levels in hierarchies.
Declaration and implementation of Level class.
int high() const override
Returns the maximal array index of a level (= size()-1).
Class for the representation of nodes.
Declaration of memory manager for allocating small pieces of memory.
Representation of proper hierarchies used by Sugiyama-layout.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.