Representation of proper hierarchies used by Sugiyama-layout. More...
#include <ogdf/layered/Hierarchy.h>
Public Types | |
| enum | TraversingDir { downward, upward } |
| The traversing direction of the layer-by-layer sweep. More... | |
Public Member Functions | |
| Hierarchy () | |
| Creates an empty hierarchy. | |
| Hierarchy (const Graph &G, const NodeArray< int > &rank) | |
| Creates an hierarchy of graph G with node ranks rank. | |
| ~Hierarchy () | |
| void | createEmpty (const Graph &G) |
| void | initByNodes (const List< node > &nodes, EdgeArray< edge > &eCopy, const NodeArray< int > &rank) |
| operator const GraphCopy & () const | |
| Conversion to const GraphCopy reference. | |
| TraversingDir | direction () const |
| Returns the current direction of layer-by-layer sweep. | |
| void | direction (TraversingDir dir) |
| Sets the current direction of layer-by-layer sweep. | |
| int | size () const |
| Returns the number of levels. | |
| int | high () const |
| Returns the maximal array index of a level (= size()-1). | |
| int | rank (node v) const |
| Returns the rank (level) of node v. | |
| int | pos (node v) const |
| Returns the position of node v on its level. | |
| const Array< node > & | adjNodes (node v) |
| Returns the adjacent nodes of v (according to direction()). | |
| const Array< node > & | adjNodes (node v, TraversingDir dir) const |
| Returns the adjacent nodes of v. | |
| const Level & | adjLevel (int i) const |
| Returns the adjacent level of level i (according to direction()). | |
| bool | isLongEdgeDummy (node v) const |
| const Level & | operator[] (int i) const |
| Returns the i-th level. | |
| Level & | operator[] (int i) |
| Returns the i-th level. | |
| int | calculateCrossings (int i) |
| Computes the number of crossings between level i and i+1. | |
| int | calculateCrossings () |
| Computes the total number of crossings. | |
| int | calculateCrossingsPlaneSweep (int i) |
| Old version of counting crossings using plane-seep algorithm (only for testing purposes). | |
| int | calculateCrossingsPlaneSweep () |
| Old version of counting crossings using plane-seep algorithm (only for testing purposes). | |
| int | calculateCrossingsSimDraw (int i, const EdgeArray< unsigned int > *edgeSubGraph) |
| Computes the number of crossings between level i and i+1 (for simultaneous drawing). | |
| int | calculateCrossingsSimDraw (const EdgeArray< unsigned int > *edgeSubGraph) |
| Computes the total number of crossings (for simultaneous drawing). | |
| void | storePos (NodeArray< int > &oldPos) |
| Stores the position of nodes in oldPos. | |
| void | restorePos (const NodeArray< int > &newPos) |
| Restores the position of nodes from newPos. | |
| void | permute () |
| Permutes the order of nodes on each level. | |
| void | separateCCs (int numCC, NodeArray< int > &component) |
| Adjusts node positions such that nodes are ordered according to components numbers. | |
| bool | transpose (node v) |
| void | print (ostream &os) |
| void | buildAdjNodes (int i) |
| void | buildAdjNodes () |
| void | check () |
Private Member Functions | |
| bool | getMarkedNodes (NodeArray< bool > &markedNodes, int r, List< node > &result, List< int > &positions) |
| void | doInit (const NodeArray< int > &rank) |
| int | transposePart (const Array< node > &adjV, const Array< node > &adjW) |
Private Attributes | |
| Array< Level * > | m_pLevel |
| The array of all levels. | |
| GraphCopy | m_GC |
| The graph copy representing the topology of the proper hierarchy. | |
| NodeArray< int > | m_pos |
| The position of a node on its level. | |
| NodeArray< int > | m_rank |
| NodeArray< Array< node > > | m_lowerAdjNodes |
| (Sorted) adjacent nodes on lower level. | |
| NodeArray< Array< node > > | m_upperAdjNodes |
| (Sorted) adjacent nodes on upper level. | |
| NodeArray< int > | m_nSet |
| (Only used by buildAdjNodes().) | |
| NodeArray< ListIterator< node > > | m_lastOcc |
| (Only used by calculateCrossingsPlaneSweep().) | |
| TraversingDir | m_direction |
| The current direction of layer-by-layer sweep. | |
Friends | |
| class | Level |
| class | LayerBasedUPRLayout |
| class | HierarchyLayoutModule |
Representation of proper hierarchies used by Sugiyama-layout.
Definition at line 63 of file Hierarchy.h.
The traversing direction of the layer-by-layer sweep.
Definition at line 71 of file Hierarchy.h.
| ogdf::Hierarchy::Hierarchy | ( | ) | [inline] |
Creates an empty hierarchy.
Definition at line 116 of file Hierarchy.h.
| ogdf::Hierarchy::Hierarchy | ( | const Graph & | G, |
| const NodeArray< int > & | rank | ||
| ) |
Creates an hierarchy of graph G with node ranks rank.
| const Level& ogdf::Hierarchy::adjLevel | ( | int | i | ) | const [inline] |
Returns the adjacent level of level i (according to direction()).
Definition at line 166 of file Hierarchy.h.
| const Array<node>& ogdf::Hierarchy::adjNodes | ( | node | v | ) | [inline] |
Returns the adjacent nodes of v (according to direction()).
Definition at line 154 of file Hierarchy.h.
| const Array<node>& ogdf::Hierarchy::adjNodes | ( | node | v, |
| TraversingDir | dir | ||
| ) | const [inline] |
Returns the adjacent nodes of v.
Definition at line 160 of file Hierarchy.h.
| void ogdf::Hierarchy::buildAdjNodes | ( | int | i | ) |
| void ogdf::Hierarchy::buildAdjNodes | ( | ) |
| int ogdf::Hierarchy::calculateCrossings | ( | int | i | ) |
Computes the number of crossings between level i and i+1.
Computes the total number of crossings.
| int ogdf::Hierarchy::calculateCrossingsPlaneSweep | ( | int | i | ) |
Old version of counting crossings using plane-seep algorithm (only for testing purposes).
Old version of counting crossings using plane-seep algorithm (only for testing purposes).
| int ogdf::Hierarchy::calculateCrossingsSimDraw | ( | int | i, |
| const EdgeArray< unsigned int > * | edgeSubGraph | ||
| ) |
Computes the number of crossings between level i and i+1 (for simultaneous drawing).
| int ogdf::Hierarchy::calculateCrossingsSimDraw | ( | const EdgeArray< unsigned int > * | edgeSubGraph | ) |
Computes the total number of crossings (for simultaneous drawing).
| void ogdf::Hierarchy::check | ( | ) |
| void ogdf::Hierarchy::createEmpty | ( | const Graph & | G | ) |
| TraversingDir ogdf::Hierarchy::direction | ( | ) | const [inline] |
Returns the current direction of layer-by-layer sweep.
Definition at line 132 of file Hierarchy.h.
| void ogdf::Hierarchy::direction | ( | TraversingDir | dir | ) | [inline] |
Sets the current direction of layer-by-layer sweep.
Definition at line 137 of file Hierarchy.h.
| void ogdf::Hierarchy::doInit | ( | const NodeArray< int > & | rank | ) | [private] |
| bool ogdf::Hierarchy::getMarkedNodes | ( | NodeArray< bool > & | markedNodes, |
| int | r, | ||
| List< node > & | result, | ||
| List< int > & | positions | ||
| ) | [inline, private] |
Definition at line 90 of file Hierarchy.h.
| int ogdf::Hierarchy::high | ( | ) | const [inline] |
Returns the maximal array index of a level (= size()-1).
Definition at line 145 of file Hierarchy.h.
| void ogdf::Hierarchy::initByNodes | ( | const List< node > & | nodes, |
| EdgeArray< edge > & | eCopy, | ||
| const NodeArray< int > & | rank | ||
| ) |
| bool ogdf::Hierarchy::isLongEdgeDummy | ( | node | v | ) | const [inline] |
Definition at line 171 of file Hierarchy.h.
| ogdf::Hierarchy::operator const GraphCopy & | ( | ) | const [inline] |
Conversion to const GraphCopy reference.
Definition at line 129 of file Hierarchy.h.
| const Level& ogdf::Hierarchy::operator[] | ( | int | i | ) | const [inline] |
Returns the i-th level.
Definition at line 176 of file Hierarchy.h.
| Level& ogdf::Hierarchy::operator[] | ( | int | i | ) | [inline] |
Returns the i-th level.
Definition at line 179 of file Hierarchy.h.
| void ogdf::Hierarchy::permute | ( | ) |
Permutes the order of nodes on each level.
| int ogdf::Hierarchy::pos | ( | node | v | ) | const [inline] |
Returns the position of node v on its level.
Definition at line 151 of file Hierarchy.h.
| void ogdf::Hierarchy::print | ( | ostream & | os | ) |
| int ogdf::Hierarchy::rank | ( | node | v | ) | const [inline] |
Returns the rank (level) of node v.
Definition at line 148 of file Hierarchy.h.
| void ogdf::Hierarchy::restorePos | ( | const NodeArray< int > & | newPos | ) |
Restores the position of nodes from newPos.
| void ogdf::Hierarchy::separateCCs | ( | int | numCC, |
| NodeArray< int > & | component | ||
| ) |
Adjusts node positions such that nodes are ordered according to components numbers.
| int ogdf::Hierarchy::size | ( | ) | const [inline] |
Returns the number of levels.
Definition at line 142 of file Hierarchy.h.
| void ogdf::Hierarchy::storePos | ( | NodeArray< int > & | oldPos | ) |
Stores the position of nodes in oldPos.
| bool ogdf::Hierarchy::transpose | ( | node | v | ) |
| int ogdf::Hierarchy::transposePart | ( | const Array< node > & | adjV, |
| const Array< node > & | adjW | ||
| ) | [private] |
friend class HierarchyLayoutModule [friend] |
Definition at line 68 of file Hierarchy.h.
friend class LayerBasedUPRLayout [friend] |
Definition at line 67 of file Hierarchy.h.
friend class Level [friend] |
Definition at line 65 of file Hierarchy.h.
TraversingDir ogdf::Hierarchy::m_direction [private] |
The current direction of layer-by-layer sweep.
Definition at line 88 of file Hierarchy.h.
GraphCopy ogdf::Hierarchy::m_GC [private] |
The graph copy representing the topology of the proper hierarchy.
Definition at line 75 of file Hierarchy.h.
NodeArray<ListIterator<node> > ogdf::Hierarchy::m_lastOcc [private] |
(Only used by calculateCrossingsPlaneSweep().)
Definition at line 86 of file Hierarchy.h.
NodeArray<Array<node> > ogdf::Hierarchy::m_lowerAdjNodes [private] |
(Sorted) adjacent nodes on lower level.
Definition at line 79 of file Hierarchy.h.
NodeArray<int> ogdf::Hierarchy::m_nSet [private] |
(Only used by buildAdjNodes().)
Definition at line 83 of file Hierarchy.h.
Array<Level *> ogdf::Hierarchy::m_pLevel [private] |
The array of all levels.
Definition at line 74 of file Hierarchy.h.
NodeArray<int> ogdf::Hierarchy::m_pos [private] |
The position of a node on its level.
Definition at line 76 of file Hierarchy.h.
NodeArray<int> ogdf::Hierarchy::m_rank [private] |
The rank (level) of a node.
Definition at line 77 of file Hierarchy.h.
NodeArray<Array<node> > ogdf::Hierarchy::m_upperAdjNodes [private] |
(Sorted) adjacent nodes on upper level.
Definition at line 81 of file Hierarchy.h.