The PreprocessorLayout removes multi-edges and self-loops. More...
#include <ogdf/basic/PreprocessorLayout.h>
Inheritance diagram for ogdf::PreprocessorLayout:Classes | |
| struct | EdgeData |
| Deleted Edges are stored in EdgeData. More... | |
Public Member Functions | |
| PreprocessorLayout () | |
| Constructor. More... | |
| ~PreprocessorLayout () | |
| Destructor. More... | |
| virtual void | call (MultilevelGraph &MLG) override |
Calculates a drawing for the Graph MLG. More... | |
| virtual void | call (GraphAttributes &GA) override |
Calculates a drawing for the Graph GA. More... | |
| void | setLayoutModule (LayoutModule *layout) |
| Sets the secondary layout. More... | |
| void | setRandomizePositions (bool on) |
| Defines whether the positions of the node are randomized before the secondary layout call. More... | |
Public Member Functions inherited from ogdf::MultilevelLayoutModule | |
| MultilevelLayoutModule () | |
| Initializes a multilevel layout module. More... | |
| virtual | ~MultilevelLayoutModule () |
Public Member Functions inherited from ogdf::LayoutModule | |
| LayoutModule () | |
| Initializes a layout module. More... | |
| virtual | ~LayoutModule () |
| void | operator() (GraphAttributes &GA) |
Computes a layout of graph GA. More... | |
Private Member Functions | |
| void | call (Graph &G, MultilevelGraph &MLG) |
Private Attributes | |
| std::vector< EdgeData > | m_deletedEdges |
| bool | m_randomize |
| std::unique_ptr< LayoutModule > | m_secondaryLayout |
The PreprocessorLayout removes multi-edges and self-loops.
To draw a graph using the ModularMultilevelMixer or other layouts the graph must be simple, i.e., contain neither multi-edges nor self-loops. Edges that conflict with these rules are deleted in the PreprocessorLayout. A secondary layout is then called that can work on the graph in required form. After the layout has been computed, the edges are inserted back into the graph, as they may have been relevant for the user.
Definition at line 50 of file PreprocessorLayout.h.
| ogdf::PreprocessorLayout::PreprocessorLayout | ( | ) |
Constructor.
|
inline |
Destructor.
Definition at line 82 of file PreprocessorLayout.h.
|
private |
|
overridevirtual |
Calculates a drawing for the Graph MLG.
Reimplemented from ogdf::MultilevelLayoutModule.
|
overridevirtual |
Calculates a drawing for the Graph GA.
Implements ogdf::MultilevelLayoutModule.
|
inline |
Sets the secondary layout.
Definition at line 94 of file PreprocessorLayout.h.
|
inline |
Defines whether the positions of the node are randomized before the secondary layout call.
Definition at line 99 of file PreprocessorLayout.h.
|
private |
Definition at line 71 of file PreprocessorLayout.h.
|
private |
Definition at line 72 of file PreprocessorLayout.h.
|
private |
Definition at line 70 of file PreprocessorLayout.h.