Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
PreprocessorLayout.h
Go to the documentation of this file.
1
32#pragma once
33
35#include <ogdf/basic/basic.h>
37
38#include <memory>
39#include <vector>
40
41namespace ogdf {
42class Graph;
43class GraphAttributes;
44class MultilevelGraph;
45
58private:
64 struct EdgeData {
65 EdgeData(int edgeInd, int sourceInd, int targetInd, double edgeWeight)
66 : edgeIndex(edgeInd), sourceIndex(sourceInd), targetIndex(targetInd), weight(edgeWeight) { }
67
71 double weight;
72 };
73
74 std::unique_ptr<LayoutModule> m_secondaryLayout;
75 std::vector<EdgeData> m_deletedEdges;
77
78 void call(Graph& G, MultilevelGraph& MLG);
79
80public:
83
86
87 using MultilevelLayoutModule::call;
88
90 virtual void call(MultilevelGraph& MLG) override;
91
93 virtual void call(GraphAttributes& GA) override;
94
96 void setLayoutModule(LayoutModule* layout) { m_secondaryLayout.reset(layout); }
97
99 void setRandomizePositions(bool on) { m_randomize = on; }
100};
101
102}
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of interface for layout algorithms that allow calls with a MultilevelGraph parameter (cla...
Basic declarations, included by all source files.
Stores additional attributes of a graph (like layout information).
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:866
Interface of general layout algorithms.
Interface of general layout algorithms that also allow a MultilevelGraph as call parameter,...
The PreprocessorLayout removes multi-edges and self-loops.
PreprocessorLayout()
Constructor.
void setRandomizePositions(bool on)
Defines whether the positions of the node are randomized before the secondary layout call.
std::vector< EdgeData > m_deletedEdges
void call(Graph &G, MultilevelGraph &MLG)
std::unique_ptr< LayoutModule > m_secondaryLayout
void setLayoutModule(LayoutModule *layout)
Sets the secondary layout.
virtual void call(MultilevelGraph &MLG) override
Calculates a drawing for the Graph MLG.
virtual void call(GraphAttributes &GA) override
Calculates a drawing for the Graph GA.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.
Deleted Edges are stored in EdgeData.
EdgeData(int edgeInd, int sourceInd, int targetInd, double edgeWeight)