Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

PreprocessorLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <memory>
36 
37 namespace ogdf {
38 
51 {
52 private:
58  struct EdgeData
59  {
60  EdgeData(int edgeInd, int sourceInd, int targetInd, double edgeWeight)
61  :edgeIndex(edgeInd), sourceIndex(sourceInd), targetIndex(targetInd), weight(edgeWeight)
62  { }
63 
64  int edgeIndex;
67  double weight;
68  };
69 
70  std::unique_ptr<LayoutModule> m_secondaryLayout;
71  std::vector<EdgeData> m_deletedEdges;
73 
74  void call(Graph &G, MultilevelGraph &MLG);
75 
76 public:
77 
80 
83 
84 
86 
88  virtual void call(MultilevelGraph &MLG) override;
89 
91  virtual void call(GraphAttributes &GA) override;
92 
94  void setLayoutModule(LayoutModule *layout) {
95  m_secondaryLayout.reset(layout);
96  }
97 
99  void setRandomizePositions(bool on) {
100  m_randomize = on;
101  }
102 };
103 
104 }
void setLayoutModule(LayoutModule *layout)
Sets the secondary layout.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void setRandomizePositions(bool on)
Defines whether the positions of the node are randomized before the secondary layout call...
std::vector< EdgeData > m_deletedEdges
Deleted Edges are stored in EdgeData.
The PreprocessorLayout removes multi-edges and self-loops.
Stores additional attributes of a graph (like layout information).
Declaration of interface for layout algorithms that allow calls with a MultilevelGraph parameter (cla...
std::unique_ptr< LayoutModule > m_secondaryLayout
virtual void call(GraphAttributes &GA) override=0
Computes a layout of graph GA.
Interface of general layout algorithms.
Definition: LayoutModule.h:44
Interface of general layout algorithms that also allow a MultilevelGraph as call parameter, extending the interface of a simple LayoutModule.
The namespace for all OGDF objects.
EdgeData(int edgeInd, int sourceInd, int targetInd, double edgeWeight)