Representation of proper hierarchies used by Sugiyama-layout. More...
#include <ogdf/layered/HierarchyLevels.h>
Inheritance diagram for ogdf::HierarchyLevels:Public Member Functions | |
| HierarchyLevels (const Hierarchy &H) | |
| ~HierarchyLevels () | |
| const Level & | adjLevel (int i) const |
Returns the adjacent level of level i (according to direction()). More... | |
| const Array< node > & | adjNodes (node v) const |
Returns the adjacent nodes of v (according to direction()). More... | |
| const Array< node > & | adjNodes (node v, TraversingDir dir) const override |
Returns the adjacent nodes of v. More... | |
| void | buildAdjNodes (int i) |
| void | buildAdjNodes () |
| int | calculateCrossingsSimDraw (int i, const EdgeArray< uint32_t > *edgeSubGraphs) const |
Computes the number of crossings between level i and i+1 (for simultaneous drawing). More... | |
| int | calculateCrossingsSimDraw (const EdgeArray< uint32_t > *edgeSubGraphs) const |
| Computes the total number of crossings (for simultaneous drawing). More... | |
| void | check () const |
| TraversingDir | direction () const |
| Returns the current direction of layer-by-layer sweep. More... | |
| void | direction (TraversingDir dir) |
| Sets the current direction of layer-by-layer sweep. More... | |
| const Hierarchy & | hierarchy () const override |
| int | high () const override |
| Returns the maximal array index of a level (= size()-1). More... | |
| const Level & | operator[] (int i) const override |
| Returns the i-th level. More... | |
| Level & | operator[] (int i) |
| Returns the i-th level. More... | |
| void | permute () |
| Permutes the order of nodes on each level. More... | |
| template<class RNG > | |
| void | permute (RNG &rng) |
| int | pos (node v) const override |
Returns the position of node v on its level. More... | |
| void | print (ostream &os) const |
| void | restorePos (const NodeArray< int > &newPos) |
Restores the position of nodes from newPos. More... | |
| void | separateCCs (int numCC, const NodeArray< int > &component) |
| Adjusts node positions such that nodes are ordered according to components numbers. More... | |
| int | size () const override |
| Returns the number of levels. More... | |
| void | storePos (NodeArray< int > &oldPos) const |
Stores the position of nodes in oldPos. More... | |
| bool | transpose (node v) |
Public Member Functions inherited from ogdf::HierarchyLevelsBase | |
| virtual | ~HierarchyLevelsBase () |
| virtual const Array< node > & | adjNodes (node v, TraversingDir dir) const =0 |
Returns the adjacent nodes of v. More... | |
| int | calculateCrossings (int i) const |
Computes the number of crossings between level i and i+1. More... | |
| int | calculateCrossings () const |
| Computes the total number of crossings. More... | |
Private Member Functions | |
| int | transposePart (const Array< node > &adjV, const Array< node > &adjW) |
Private Attributes | |
| TraversingDir | m_direction |
| The current direction of layer-by-layer sweep. More... | |
| const Hierarchy & | m_H |
| NodeArray< Array< node > > | m_lowerAdjNodes |
| (Sorted) adjacent nodes on lower level. More... | |
| NodeArray< int > | m_nSet |
| (Only used by buildAdjNodes().) More... | |
| Array< Level * > | m_pLevel |
| The array of all levels. More... | |
| NodeArray< int > | m_pos |
| The position of a node on its level. More... | |
| NodeArray< Array< node > > | m_upperAdjNodes |
| (Sorted) adjacent nodes on upper level. More... | |
Friends | |
| class | LayerBasedUPRLayout |
| class | Level |
Additional Inherited Members | |
Public Types inherited from ogdf::HierarchyLevelsBase | |
| enum | TraversingDir { TraversingDir::downward, TraversingDir::upward } |
Representation of proper hierarchies used by Sugiyama-layout.
Definition at line 46 of file HierarchyLevels.h.
|
explicit |
| ogdf::HierarchyLevels::~HierarchyLevels | ( | ) |
|
inline |
Returns the adjacent level of level i (according to direction()).
Definition at line 104 of file HierarchyLevels.h.
Returns the adjacent nodes of v (according to direction()).
Definition at line 92 of file HierarchyLevels.h.
|
inlineoverride |
Returns the adjacent nodes of v.
Definition at line 98 of file HierarchyLevels.h.
| void ogdf::HierarchyLevels::buildAdjNodes | ( | int | i | ) |
| void ogdf::HierarchyLevels::buildAdjNodes | ( | ) |
| int ogdf::HierarchyLevels::calculateCrossingsSimDraw | ( | int | i, |
| const EdgeArray< uint32_t > * | edgeSubGraphs | ||
| ) | const |
Computes the number of crossings between level i and i+1 (for simultaneous drawing).
| int ogdf::HierarchyLevels::calculateCrossingsSimDraw | ( | const EdgeArray< uint32_t > * | edgeSubGraphs | ) | const |
Computes the total number of crossings (for simultaneous drawing).
| void ogdf::HierarchyLevels::check | ( | ) | const |
|
inline |
Returns the current direction of layer-by-layer sweep.
Definition at line 73 of file HierarchyLevels.h.
|
inline |
Sets the current direction of layer-by-layer sweep.
Definition at line 78 of file HierarchyLevels.h.
|
inlineoverridevirtual |
Implements ogdf::HierarchyLevelsBase.
Definition at line 70 of file HierarchyLevels.h.
|
inlineoverridevirtual |
Returns the maximal array index of a level (= size()-1).
Reimplemented from ogdf::HierarchyLevelsBase.
Definition at line 86 of file HierarchyLevels.h.
|
inlineoverridevirtual |
Returns the i-th level.
Implements ogdf::HierarchyLevelsBase.
Definition at line 109 of file HierarchyLevels.h.
|
inline |
Returns the i-th level.
Definition at line 112 of file HierarchyLevels.h.
| void ogdf::HierarchyLevels::permute | ( | ) |
Permutes the order of nodes on each level.
| void ogdf::HierarchyLevels::permute | ( | RNG & | rng | ) |
Definition at line 150 of file HierarchyLevels.h.
|
inlineoverridevirtual |
Returns the position of node v on its level.
Implements ogdf::HierarchyLevelsBase.
Definition at line 89 of file HierarchyLevels.h.
| void ogdf::HierarchyLevels::print | ( | ostream & | os | ) | const |
| void ogdf::HierarchyLevels::restorePos | ( | const NodeArray< int > & | newPos | ) |
Restores the position of nodes from newPos.
| void ogdf::HierarchyLevels::separateCCs | ( | int | numCC, |
| const NodeArray< int > & | component | ||
| ) |
Adjusts node positions such that nodes are ordered according to components numbers.
|
inlineoverridevirtual |
Returns the number of levels.
Implements ogdf::HierarchyLevelsBase.
Definition at line 83 of file HierarchyLevels.h.
| void ogdf::HierarchyLevels::storePos | ( | NodeArray< int > & | oldPos | ) | const |
Stores the position of nodes in oldPos.
| bool ogdf::HierarchyLevels::transpose | ( | node | v | ) |
|
private |
|
friend |
Definition at line 51 of file HierarchyLevels.h.
|
friend |
Definition at line 50 of file HierarchyLevels.h.
|
private |
The current direction of layer-by-layer sweep.
Definition at line 64 of file HierarchyLevels.h.
|
private |
Definition at line 54 of file HierarchyLevels.h.
(Sorted) adjacent nodes on lower level.
Definition at line 59 of file HierarchyLevels.h.
|
private |
(Only used by buildAdjNodes().)
Definition at line 62 of file HierarchyLevels.h.
The array of all levels.
Definition at line 56 of file HierarchyLevels.h.
|
private |
The position of a node on its level.
Definition at line 57 of file HierarchyLevels.h.
(Sorted) adjacent nodes on upper level.
Definition at line 60 of file HierarchyLevels.h.