Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::PreprocessorLayout Class Reference

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
 

Detailed Description

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 52 of file PreprocessorLayout.h.

Constructor & Destructor Documentation

◆ PreprocessorLayout()

ogdf::PreprocessorLayout::PreprocessorLayout ( )

Constructor.

◆ ~PreprocessorLayout()

ogdf::PreprocessorLayout::~PreprocessorLayout ( )
inline

Destructor.

Definition at line 84 of file PreprocessorLayout.h.

Member Function Documentation

◆ call() [1/3]

void ogdf::PreprocessorLayout::call ( Graph &  G,
MultilevelGraph &  MLG 
)
private

◆ call() [2/3]

virtual void ogdf::PreprocessorLayout::call ( MultilevelGraph &  MLG)
overridevirtual

Calculates a drawing for the Graph MLG.

Reimplemented from ogdf::MultilevelLayoutModule.

◆ call() [3/3]

virtual void ogdf::PreprocessorLayout::call ( GraphAttributes &  GA)
overridevirtual

Calculates a drawing for the Graph GA.

Implements ogdf::MultilevelLayoutModule.

◆ setLayoutModule()

void ogdf::PreprocessorLayout::setLayoutModule ( LayoutModule *  layout)
inline

Sets the secondary layout.

Definition at line 96 of file PreprocessorLayout.h.

◆ setRandomizePositions()

void ogdf::PreprocessorLayout::setRandomizePositions ( bool  on)
inline

Defines whether the positions of the node are randomized before the secondary layout call.

Definition at line 101 of file PreprocessorLayout.h.

Member Data Documentation

◆ m_deletedEdges

std::vector<EdgeData> ogdf::PreprocessorLayout::m_deletedEdges
private

Definition at line 73 of file PreprocessorLayout.h.

◆ m_randomize

bool ogdf::PreprocessorLayout::m_randomize
private

Definition at line 74 of file PreprocessorLayout.h.

◆ m_secondaryLayout

std::unique_ptr<LayoutModule> ogdf::PreprocessorLayout::m_secondaryLayout
private

Definition at line 72 of file PreprocessorLayout.h.


The documentation for this class was generated from the following file: