Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches

The sifting heuristic for 2-layer crossing minimization. More...

#include <ogdf/layered/SiftingHeuristic.h>

+ Inheritance diagram for ogdf::SiftingHeuristic:

Public Types

enum class  Strategy { LeftToRight , DescDegree , Random }
 Enumerates the different sifting strategies. More...
 

Public Member Functions

 SiftingHeuristic ()
 Creates a new instance of the sifting heuristic with default option settings.
 
 SiftingHeuristic (const SiftingHeuristic &crossMin)
 Creates a new instance of the sifting heuristic with the same option settings as crossMin.
 
 ~SiftingHeuristic ()
 
virtual void call (Level &L) override
 Calls the sifting heuristic for level L.
 
virtual void cleanup () override
 Does some clean-up after calls.
 
virtual LayerByLayerSweepclone () const override
 Returns a new instance of the sifting heuristic with the same option settings.
 
virtual void init (const HierarchyLevels &levels) override
 Initializes crossing minimization for hierarchy H.
 
Strategy strategy () const
 Get for Strategy.
 
void strategy (Strategy strategy)
 Set for Strategy.
 
- Public Member Functions inherited from ogdf::LayerByLayerSweep
 LayerByLayerSweep ()
 Initializes a two-layer crossing minimization module.
 
virtual ~LayerByLayerSweep ()
 
void operator() (Level &L)
 Performs crossing minimization for level L.
 
virtual const HierarchyLevelsreduceCrossings (const SugiyamaLayout &sugi, const Hierarchy &H, int &nCrossings)
 
virtual const HierarchyLevelsreduceCrossings (const SugiyamaLayout &sugi, Hierarchy &H, int &nCrossings) override
 Template method implementation of reduceCrossings from LayeredCrossMinModule.
 
- Public Member Functions inherited from ogdf::LayeredCrossMinModule
 LayeredCrossMinModule ()
 Creates empty module.
 
virtual ~LayeredCrossMinModule ()
 Destruct.
 

Private Attributes

CrossingsMatrixm_crossingMatrix
 
Strategy m_strategy
 

Detailed Description

The sifting heuristic for 2-layer crossing minimization.

Definition at line 43 of file SiftingHeuristic.h.

Member Enumeration Documentation

◆ Strategy

Enumerates the different sifting strategies.

Enumerator
LeftToRight 
DescDegree 
Random 

Definition at line 57 of file SiftingHeuristic.h.

Constructor & Destructor Documentation

◆ SiftingHeuristic() [1/2]

ogdf::SiftingHeuristic::SiftingHeuristic ( )

Creates a new instance of the sifting heuristic with default option settings.

◆ SiftingHeuristic() [2/2]

ogdf::SiftingHeuristic::SiftingHeuristic ( const SiftingHeuristic crossMin)

Creates a new instance of the sifting heuristic with the same option settings as crossMin.

◆ ~SiftingHeuristic()

ogdf::SiftingHeuristic::~SiftingHeuristic ( )

Member Function Documentation

◆ call()

virtual void ogdf::SiftingHeuristic::call ( Level L)
overridevirtual

Calls the sifting heuristic for level L.

Implements ogdf::LayerByLayerSweep.

◆ cleanup()

virtual void ogdf::SiftingHeuristic::cleanup ( )
overridevirtual

Does some clean-up after calls.

Reimplemented from ogdf::LayerByLayerSweep.

◆ clone()

virtual LayerByLayerSweep * ogdf::SiftingHeuristic::clone ( ) const
inlineoverridevirtual

Returns a new instance of the sifting heuristic with the same option settings.

Implements ogdf::LayerByLayerSweep.

Definition at line 54 of file SiftingHeuristic.h.

◆ init()

virtual void ogdf::SiftingHeuristic::init ( const HierarchyLevels levels)
overridevirtual

Initializes crossing minimization for hierarchy H.

Reimplemented from ogdf::LayerByLayerSweep.

◆ strategy() [1/2]

Strategy ogdf::SiftingHeuristic::strategy ( ) const
inline

Get for Strategy.

Definition at line 69 of file SiftingHeuristic.h.

◆ strategy() [2/2]

void ogdf::SiftingHeuristic::strategy ( Strategy  strategy)
inline

Set for Strategy.

Parameters
strategyis the Strategy to be set

Definition at line 76 of file SiftingHeuristic.h.

Member Data Documentation

◆ m_crossingMatrix

CrossingsMatrix* ogdf::SiftingHeuristic::m_crossingMatrix
private

Definition at line 79 of file SiftingHeuristic.h.

◆ m_strategy

Strategy ogdf::SiftingHeuristic::m_strategy
private

Definition at line 80 of file SiftingHeuristic.h.


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