42class LayerBasedUPRLayout;
44template<
class T =
double>
77 : m_nodes(num), m_pLevels(
pLevels), m_index(index) { }
89 int size()
const override {
return m_nodes.
size(); }
92 int high()
const override {
return m_nodes.
high(); }
95 int index()
const {
return m_index; }
Declaration of interfaces used in Sugiyama framework.
Includes declaration of graph class.
Declaration of singly linked lists and iterators.
The parameterized class Array implements dynamic arrays of type E.
INDEX high() const
Returns the maximal array index.
void quicksort()
Sorts array using Quicksort.
INDEX size() const
Returns the size (number of elements) of the array.
Interface of hierarchy layout algorithms.
Representation of proper hierarchies used by Sugiyama-layout.
Representation of levels in hierarchies.
Representation of levels in hierarchies.
const HierarchyLevels & levels() const
Returns the hierarchy to which this level belongs.
void getIsolatedNodes(SListPure< Tuple2< node, int > > &isolated) const
int m_index
The index of this level.
void setIsolatedNodes(SListPure< Tuple2< node, int > > &isolated)
void sortByWeightOnly(NodeArray< double > &weight)
Sorts the nodes according to weight (without special placement for "isolated" nodes).
void swap(int i, int j)
Exchanges nodes at position i and j.
node & operator[](int i) override
Returns the node at position i.
void sort(NodeArray< double > &weight)
Sorts the nodes according to weight using quicksort.
void sort(NodeArray< int > &weight, int minBucket, int maxBucket)
Sorts the nodes according to weight using bucket sort.
int index() const
Returns the array index of this level in the hierarchy.
void sortOrder(C &orderComparer)
Sorts the nodes according to orderComparer.
friend std::ostream & operator<<(std::ostream &os, const Level &L)
const node & operator[](int i) const override
Returns the node at position i.
const Array< node > & adjNodes(node v) const
Returns the (sorted) array of adjacent nodes of v (according to direction()).
Level(HierarchyLevels *pLevels, int index, int num)
Creates a level with index index in hierarchy pLevels.
int high() const override
Returns the maximal array index (= size()-1).
HierarchyLevels * m_pLevels
The hierarchy to which this level belongs.
int size() const override
Returns the number of nodes on this level.
Array< node > m_nodes
The nodes on this level.
Dynamic arrays indexed with nodes.
Class for the representation of nodes.
Tuples of two elements (2-tuples).
const NodeArray< T > * m_pWeight
bool less(node v, node w) const
WeightComparer(const NodeArray< T > *pWeight)
bool operator()(node v, node w) const
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.