Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::LayerByLayerSweep Class Referenceabstract

Interface of two-layer crossing minimization algorithms. More...

#include <ogdf/layered/LayerByLayerSweep.h>

+ Inheritance diagram for ogdf::LayerByLayerSweep:

Public Member Functions

 LayerByLayerSweep ()
 Initializes a two-layer crossing minimization module. More...
 
virtual ~LayerByLayerSweep ()
 
virtual void call (Level &L)=0
 Performs crossing minimization for level L. More...
 
virtual void cleanup () override
 Performs clean-up. More...
 
virtual LayerByLayerSweepclone () const =0
 Returns a new instance of the two-layer crossing minimization module with the same option settings. More...
 
virtual void init (const HierarchyLevels &levels)
 Initializes the crossing minimization module for hierarchy levels levels. More...
 
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...
 

Detailed Description

Interface of two-layer crossing minimization algorithms.

The interface of a two-layer crossing minimization algorithm consists of four methods:

  1. init(const Hierarchy & H) must be called first. This initializes the module for operating on hierarchy H.
  2. call(Level &L) (or operator()(Level &L)) performs two-layer crossing minimization, where L is the permutable level and the neighbor level of L (fixed level) is determined by the hierarchy (see documentation of class Hierarchy). Any number of call's may be performed once init() has been executed.
  3. cleanup() has to be called last and performs some final clean-up work.

Definition at line 61 of file LayerByLayerSweep.h.

Constructor & Destructor Documentation

◆ LayerByLayerSweep()

ogdf::LayerByLayerSweep::LayerByLayerSweep ( )
inline

Initializes a two-layer crossing minimization module.

Definition at line 74 of file LayerByLayerSweep.h.

◆ ~LayerByLayerSweep()

virtual ogdf::LayerByLayerSweep::~LayerByLayerSweep ( )
inlinevirtual

Definition at line 76 of file LayerByLayerSweep.h.

Member Function Documentation

◆ call()

virtual void ogdf::LayerByLayerSweep::call ( Level L)
pure virtual

Performs crossing minimization for level L.

Parameters
Lis the level in the hierarchy on which nodes are permuted; the neighbor level (fixed level) is determined by the hierarchy.

Implemented in ogdf::TwoLayerCrossMinSimDraw, ogdf::SplitHeuristic, ogdf::SiftingHeuristic, ogdf::BarycenterHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, and ogdf::GreedyInsertHeuristic.

◆ cleanup()

virtual void ogdf::LayerByLayerSweep::cleanup ( )
inlineoverridevirtual

◆ clone()

virtual LayerByLayerSweep* ogdf::LayerByLayerSweep::clone ( ) const
pure virtual

Returns a new instance of the two-layer crossing minimization module with the same option settings.

Implemented in ogdf::SplitHeuristic, ogdf::BarycenterHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, ogdf::SiftingHeuristic, ogdf::GreedyInsertHeuristic, and ogdf::TwoLayerCrossMinSimDraw.

◆ init()

virtual void ogdf::LayerByLayerSweep::init ( const HierarchyLevels levels)
inlinevirtual

Initializes the crossing minimization module for hierarchy levels levels.

Parameters
levelsis the hierarchy on which the module shall operate.

Reimplemented in ogdf::SplitHeuristic, ogdf::SiftingHeuristic, ogdf::BarycenterHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, and ogdf::GreedyInsertHeuristic.

Definition at line 86 of file LayerByLayerSweep.h.

◆ operator()()

void ogdf::LayerByLayerSweep::operator() ( Level L)
inline

Performs crossing minimization for level L.

Parameters
Lis the level in the hierarchy on which nodes are permuted; the neighbor level (fixed level) is determined by the hierarchy.

Definition at line 102 of file LayerByLayerSweep.h.

◆ reduceCrossings() [1/2]

virtual const HierarchyLevels* ogdf::LayerByLayerSweep::reduceCrossings ( const SugiyamaLayout sugi,
const Hierarchy H,
int &  nCrossings 
)
virtual

◆ reduceCrossings() [2/2]

virtual const HierarchyLevels* ogdf::LayerByLayerSweep::reduceCrossings ( const SugiyamaLayout sugi,
Hierarchy H,
int &  nCrossings 
)
inlineoverridevirtual

Template method implementation of reduceCrossings from LayeredCrossMinModule.

Implements ogdf::LayeredCrossMinModule.

Definition at line 67 of file LayerByLayerSweep.h.


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