Open
Graph Drawing
Framework

 v. snapshot-2018-03-28
 

ogdf::LayerByLayerSweep Class Referenceabstract

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

#include <ogdf/module/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 57 of file LayerByLayerSweep.h.

Constructor & Destructor Documentation

◆ LayerByLayerSweep()

ogdf::LayerByLayerSweep::LayerByLayerSweep ( )
inline

Initializes a two-layer crossing minimization module.

Definition at line 70 of file LayerByLayerSweep.h.

◆ ~LayerByLayerSweep()

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

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

Definition at line 82 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 98 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 63 of file LayerByLayerSweep.h.


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