Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

PreprocessorLayout.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <memory>
36 
37 
38 namespace ogdf {
39 
40 
53 {
54 private:
60  struct EdgeData
61  {
62  EdgeData(int edgeInd, int sourceInd, int targetInd, double edgeWeight)
63  :edgeIndex(edgeInd), sourceIndex(sourceInd), targetIndex(targetInd), weight(edgeWeight)
64  { }
65 
66  int edgeIndex;
69  double weight;
70  };
71 
72  std::unique_ptr<LayoutModule> m_secondaryLayout;
73  std::vector<EdgeData> m_deletedEdges;
75 
76  void call(Graph &G, MultilevelGraph &MLG);
77 
78 public:
79 
82 
85 
86 
88 
90  virtual void call(MultilevelGraph &MLG) override;
91 
93  virtual void call(GraphAttributes &GA) override;
94 
96  void setLayoutModule(LayoutModule *layout) {
97  m_secondaryLayout.reset(layout);
98  }
99 
101  void setRandomizePositions(bool on) {
102  m_randomize = on;
103  }
104 };
105 
106 
107 } // namespace ogdf
void setLayoutModule(LayoutModule *layout)
Sets the secondary layout.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#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)