Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

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 58 of file LayerByLayerSweep.h.

Constructor & Destructor Documentation

◆ LayerByLayerSweep()

ogdf::LayerByLayerSweep::LayerByLayerSweep ( )
inline

Initializes a two-layer crossing minimization module.

Definition at line 71 of file LayerByLayerSweep.h.

◆ ~LayerByLayerSweep()

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

Definition at line 73 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::BarycenterHeuristic, ogdf::GreedyInsertHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, ogdf::SiftingHeuristic, ogdf::SplitHeuristic, and ogdf::TwoLayerCrossMinSimDraw.

◆ 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::TwoLayerCrossMinSimDraw, ogdf::BarycenterHeuristic, ogdf::GreedyInsertHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, ogdf::SiftingHeuristic, and ogdf::SplitHeuristic.

◆ 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::BarycenterHeuristic, ogdf::GreedyInsertHeuristic, ogdf::GreedySwitchHeuristic, ogdf::MedianHeuristic, ogdf::SiftingHeuristic, and ogdf::SplitHeuristic.

Definition at line 83 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 99 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 64 of file LayerByLayerSweep.h.


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