41 class HierarchyLevels;
42 class LayerBasedUPRLayout;
45 template <
class T =
double>
52 bool less(
node v,
node w)
const {
return (*m_pWeight)[v] < (*m_pWeight)[w]; }
79 m_nodes(num), m_pLevels(pLevels), m_index(index) { }
90 int size()
const override {
return m_nodes.
size(); }
93 int high()
const override {
return m_nodes.
high(); }
96 int index()
const {
return m_index; }
105 void swap(
int i,
int j);
Declaration of singly linked lists and iterators.
bool less(node v, node w) const
node & operator[](int i) override
Returns the node at position i.
Representation of proper hierarchies used by Sugiyama-layout.
HierarchyLevels * m_pLevels
The hierarchy to which this level belongs.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
bool operator()(node v, node w) const
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
INDEX high() const
Returns the maximal array index.
Declaration of interfaces used in Sugiyama framework.
int high() const override
Returns the maximal array index (= size()-1).
Level(HierarchyLevels *pLevels, int index, int num)
Creates a level with index index in hierarchy pLevels.
const HierarchyLevels & levels() const
Returns the hierarchy to which this level belongs.
Representation of levels in hierarchies.
Representation of levels in hierarchies.
int m_index
The index of this level.
Array< node > m_nodes
The nodes on this level.
void sort(T *array, int size, LessThan lt)
const NodeArray< T > * m_pWeight
Dynamic arrays indexed with nodes.
INDEX size() const
Returns the size (number of elements) of the array.
Interface of hierarchy layout algorithms.
int index() const
Returns the array index of this level in the hierarchy.
Class for the representation of nodes.
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.
Includes declaration of graph class.
void sortOrder(C &orderComparer)
Sorts the nodes according to orderComparer.
void quicksort()
Sorts array using Quicksort.
The namespace for all OGDF objects.
friend ostream & operator<<(ostream &os, const Level &L)
WeightComparer(const NodeArray< T > *pWeight)
const node & operator[](int i) const override
Returns the node at position i.
int size() const override
Returns the number of nodes on this level.