Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

CrossingMinInterfaces.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/layered/Hierarchy.h>
36 
37 
38 namespace ogdf {
39 
41 
44 class LevelBase
45 {
46 public:
47  // destruction
48  virtual ~LevelBase() { }
49 
51  virtual const node &operator[](int i) const = 0;
52 
54  virtual node &operator[](int i) = 0;
55 
57  virtual int size() const = 0;
58 
60  virtual int high() const = 0;
61 };
62 
63 
64 
66 
67 public:
68  // destruction
69  virtual ~HierarchyLevelsBase() { }
70 
71  enum class TraversingDir { downward, upward };
72 
74  virtual const LevelBase &operator[](int i) const = 0;
75 
77  virtual int pos(node v) const = 0;
78 
80  virtual int size() const = 0;
81 
83  virtual int high() const { return size() - 1; }
84 
85  virtual const Hierarchy &hierarchy() const = 0;
86 
88  virtual const Array<node> &adjNodes(node v, TraversingDir dir) const = 0;
89 
91  int calculateCrossings(int i) const;
92 
94  int calculateCrossings() const;
95 };
96 
97 }
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
virtual int high() const
Returns the maximal array index of a level (= size()-1).
Representation of levels in hierarchies.
Declaration of Hierarchy class.
virtual int high() const =0
Returns the maximal array index (= size()-1).
virtual const node & operator[](int i) const =0
Returns the node at position i.
Class for the representation of nodes.
Definition: Graph_d.h:167
Includes declaration of graph class.
The namespace for all OGDF objects.
virtual int size() const =0
Returns the number of nodes on this level.
Representation of proper hierarchies used by Sugiyama-layout.
Definition: Hierarchy.h:44