Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

CrossingsMatrix.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/EdgeArray.h>
36 #include <ogdf/basic/Array2D.h>
37 #include <ogdf/layered/Hierarchy.h>
39 
40 namespace ogdf
41 {
42 
46 {
47 public:
48  CrossingsMatrix() : matrix(0,0,0,0) {
49  m_bigM = 10000;
50  }
51 
52  explicit CrossingsMatrix(const HierarchyLevels &levels);
53 
55 
56  int operator()(int i, int j) const
57  {
58  return matrix(map[i],map[j]);
59  }
60 
61  void swap(int i, int j)
62  {
63  map.swap(i,j);
64  }
65 
67  void init(Level &L);
68 
70  void init(Level &L, const EdgeArray<uint32_t> *edgeSubGraphs);
71 
72 private:
76  int m_bigM; // is set to some big number in both constructors
77 };
78 
79 }
Representation of proper hierarchies used by Sugiyama-layout.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of HierarchyLevels class.
Representation of levels in hierarchies.
Definition: Level.h:61
void init()
Definition: graphics.h:472
Declaration of Hierarchy class.
int m_bigM
need this for SimDraw to grant epsilon-crossings instead of zero-crossings
Array2D< int > matrix
Declaration and implementation of EdgeArray class.
Implements crossings matrix which is used by some TwoLayerCrossingMinimization heuristics (e...
int operator()(int i, int j) const
The namespace for all OGDF objects.
void swap(int i, int j)
Declaration and implementation of class Array2D which implements dynamic two dimensional arrays...