57 int size()
const override {
return m_nodes.
size(); }
59 int high()
const override {
return m_nodes.
high(); }
146 unsigned int m_storedCrossings;
147 unsigned int m_currentCrossings;
157 unsigned int m_blocksCount;
181 return *(m_levels[i]);
189 return m_levels.
size();
198 if ( dir == TraversingDir::upward ) {
199 return m_upperAdjNodes[v];
201 return m_lowerAdjNodes[v];
220 void globalSifting(
int rho = 1,
int nRepeats = 10,
int *pNumCrossings =
nullptr );
224 void doInit(
bool longEdgesOnly =
true);
226 void doInit(
bool longEdgesOnly =
true,
const NodeArray<int> &ranks);
234 void sortAdjacencies();
260 int siftingSwap(
Block *blockOfA,
Block *blockOfB);
267 int siftingStep(
Block *blockOfA );
277 void buildDummyNodesLists();
282 void buildAdjNodes();
289 buildDummyNodesLists();
292 m_storedCrossings = calculateCrossings();
302 int verticalSwap(
Block *b,
int level );
305 int localCountCrossings(
const Array<int> &levels );
312 void verticalStep(
Block *b );
321 void gridSifting(
int nRepeats = 10 );
Array< int > m_nNodesOnLvls
The simple implementation of LevelBase interface.
int m_storedCrossings
Numebr of crossings stored in the sifting step.
int pos(node v) const override
Returns the position of node v on its level.
Data type for general directed graphs (adjacency list representation).
Array< int > m_currentPerm
The permutation modified in the sifting step.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Hierarchical graph representation used by GlobalSifting and GridSifting algorithms.
EdgeArray< Block * > m_EdgeBlocks
The array of all edge blocks.
NodeArray< int > m_pos
The position of a node on its level.
INDEX high() const
Returns the maximal array index.
Declaration of interfaces used in Sugiyama framework.
Array< Block * > m_Blocks
The array of all blocks.
int size() const override
Returns the number of levels.
NodeArray< Array< node > > m_upperAdjNodes
(Sorted) adjacent nodes on upper level.
Array< int > m_InvertedOutgoing
Positions of this block in m_NeighboursIncoming of neighbours.
NodeArray< int > m_nSet
(Only used by buildAdjNodes().)
int blocksCount()
Returns the number of blocks.
const Hierarchy & hierarchy() const override
Array< int > m_storedPerm
The permutation from which the sifting step starts.
Dynamic arrays indexed with edges.
const node & operator[](int i) const override
Returns the node at position i.
Representation of levels in hierarchies.
const ArrayLevel & operator[](int i) const override
Returns the i-th level.
Array< node > m_nodes
Vertices from the proper hierarchy corresponding to this block.
Array< int > m_NeighboursOutgoing
Indices of neighbouring outgoing blocks.
NodeArray< Array< node > > m_lowerAdjNodes
(Sorted) adjacent nodes on lower level.
EdgeArray< bool > m_isActiveEdge
Stores information about active edge blocks.
int m_bestCrossings
The lowest number of crossing found in the sifting step.
ArrayLevel(unsigned int size)
Declaration and implementation of EdgeArray class.
NodeArray< int > m_ranks
The rank (level) of a node.
GraphCopy m_GC
The graph copy representing the topology of the proper hierarchy.
INDEX size() const
Returns the size (number of elements) of the array.
Declaration of graph copy classes.
ArrayLevel(const Array< node > &nodes)
Class representing idea of Blocks used in GlobalSifting and GridSifting algorithms.
Class for the representation of edges.
const Array< node > & adjNodes(node v, TraversingDir dir) const override
Returns the adjacent nodes of v.
Copies of graphs supporting edge splitting.
Array< int > m_currentPermInv
Inversion of m_currenPerm.
Class for the representation of nodes.
Declaration and implementation of NodeArray class.
NodeArray< Block * > m_NodeBlocks
The array of all vertex blocks.
Array< int > m_bestPerm
The best found permutation in the sifting step.
node & operator[](int i) override
Returns the node at position i.
Array< int > m_NeighboursIncoming
Indices of neighbouring incoming blocks.
Includes declaration of graph class.
int high() const override
Returns the maximal array index (= size()-1).
Array< int > m_InvertedIncoming
Positions of this block in m_NeighboursOutgoing of neighbours.
Hierarchy & m_hierarchy
The hierarchy on grid- and globalsifting operates.
The namespace for all OGDF objects.
Array< ArrayLevel * > m_levels
The array of all levels.
void buildHierarchy()
Builds arrays that allow using BlockOrder as HierarchyLevelsBase implementation.
int size() const override
Returns the number of nodes on this level.
Representation of proper hierarchies used by Sugiyama-layout.