Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

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

#include <ogdf/layered/SiftingHeuristic.h>

+ Inheritance diagram for ogdf::SiftingHeuristic:

Public Types

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

Public Member Functions

 SiftingHeuristic ()
 Creates a new instance of the sifting heuristic with default option settings. More...
 
 SiftingHeuristic (const SiftingHeuristic &crossMin)
 Creates a new instance of the sifting heuristic with the same option settings as crossMin. More...
 
 ~SiftingHeuristic ()
 
virtual void call (Level &L) override
 Calls the sifting heuristic for level L. More...
 
virtual void cleanup () override
 Does some clean-up after calls. More...
 
virtual LayerByLayerSweepclone () const override
 Returns a new instance of the sifting heuristic with the same option settings. More...
 
virtual void init (const HierarchyLevels &levels) override
 Initializes crossing minimization for hierarchy H. More...
 
Strategy strategy () const
 Get for Strategy. More...
 
void strategy (Strategy strategy)
 Set for Strategy. More...
 
- Public Member Functions inherited from ogdf::LayerByLayerSweep
 LayerByLayerSweep ()
 Initializes a two-layer crossing minimization module. More...
 
virtual ~LayerByLayerSweep ()
 
void operator() (Level &L)
 Performs crossing minimization for level L. More...
 
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. More...
 
- Public Member Functions inherited from ogdf::LayeredCrossMinModule
 LayeredCrossMinModule ()
 Creates empty module. More...
 
virtual ~LayeredCrossMinModule ()
 Destruct. More...
 

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 61 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 55 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 73 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 82 of file SiftingHeuristic.h.

Member Data Documentation

◆ m_crossingMatrix

CrossingsMatrix* ogdf::SiftingHeuristic::m_crossingMatrix
private

Definition at line 87 of file SiftingHeuristic.h.

◆ m_strategy

Strategy ogdf::SiftingHeuristic::m_strategy
private

Definition at line 88 of file SiftingHeuristic.h.


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