45template<
class E1,
class E2>
50template<
class T =
double>
83 : m_nodes(num), m_pLevels(pLevels), m_index(index) { }
95 int size()
const override {
return m_nodes.
size(); }
98 int high()
const override {
return m_nodes.
high(); }
101 int index()
const {
return m_index; }
Declaration and implementation of Array class and Array algorithms.
Declaration of interfaces used in Sugiyama framework.
Includes declaration of graph class.
Basic declarations, included by all source files.
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.
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
RegisteredArray for nodes, edges and adjEntries of a graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.