Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::ForceLayoutModule Class Referenceabstract

Interface of general layout algorithms. More...

#include <ogdf/energybased/ForceLayoutModule.h>

+ Inheritance diagram for ogdf::ForceLayoutModule:

Public Member Functions

 ForceLayoutModule ()
 Initializes a force layout module.
 
virtual ~ForceLayoutModule ()
 
virtual void call (GraphAttributes &GA) override=0
 Computes a layout of graph GA.
 
virtual void call (MultilevelGraph &MLG)
 Computes a layout of graph MLG.
 
- Public Member Functions inherited from ogdf::LayoutModule
 LayoutModule ()
 Initializes a layout module.
 
virtual ~LayoutModule ()
 
void operator() (GraphAttributes &GA)
 Computes a layout of graph GA.
 

Private Attributes

int m_currentLevel
 

Detailed Description

Interface of general layout algorithms.

Definition at line 45 of file ForceLayoutModule.h.

Constructor & Destructor Documentation

◆ ForceLayoutModule()

ogdf::ForceLayoutModule::ForceLayoutModule ( )
inline

Initializes a force layout module.

Definition at line 51 of file ForceLayoutModule.h.

◆ ~ForceLayoutModule()

virtual ogdf::ForceLayoutModule::~ForceLayoutModule ( )
inlinevirtual

Definition at line 53 of file ForceLayoutModule.h.

Member Function Documentation

◆ call() [1/2]

virtual void ogdf::ForceLayoutModule::call ( GraphAttributes GA)
overridepure virtual

Computes a layout of graph GA.

This method is the actual algorithm call and must be implemented by derived classes.

Parameters
GAis the input graph and will also be assigned the layout information.

Implements ogdf::LayoutModule.

Implemented in ogdf::SpringEmbedderFRExact.

◆ call() [2/2]

virtual void ogdf::ForceLayoutModule::call ( MultilevelGraph MLG)
inlinevirtual

Computes a layout of graph MLG.

This method can be implemented optionally to allow a LayoutModule to modify the Graph. This allows some Layout Algorithms to save Memory, compared to a normal call(GA) DO NOT implement this if you are not sure whether this would save you Memory! This Method only helps if the Graph is already in the MultiLevelGraph Format (or can be converted without creating a copy) AND the Layout would need a copy otherwise. All incremental Layouts (especially energy based) CAN be called by ModularMultilevelMixer. The standard implementation converts the MLG to GA and uses call(GA).

If implemented, the following Implementation of call(GA) is advised to ensure consistent behaviour of the two call Methods: void YourLayout::call(GraphAttributes &GA) { MultilevelGraph MLG(GA); call(MLG); MLG.exportAttributes(GA); }

Parameters
MLGis the input graph and will also be assigned the layout information.

Definition at line 79 of file ForceLayoutModule.h.

Member Data Documentation

◆ m_currentLevel

int ogdf::ForceLayoutModule::m_currentLevel
private

Definition at line 47 of file ForceLayoutModule.h.


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