Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::LongestPathCompaction Class Reference

Compaction algorithm using longest paths in the constraint graph. More...

#include <ogdf/orthogonal/LongestPathCompaction.h>

Public Member Functions

 LongestPathCompaction (bool tighten=true, int maxImprovementSteps=0)
 Creates an instance of the longest path compaction algorithm. More...
 
void constructiveHeuristics (PlanRep &PG, OrthoRep &OR, const RoutingChannel< int > &rc, GridLayoutMapped &drawing)
 Constructive heurisitic for orthogonal representations. More...
 
void improvementHeuristics (PlanRep &PG, OrthoRep &OR, const RoutingChannel< int > &rc, GridLayoutMapped &drawing)
 Improvement heurisitic for orthogonal drawings. More...
 
int maxImprovementSteps () const
 Returns the option max improvement steps. More...
 
void maxImprovementSteps (int maxSteps)
 Sets the option max improvement steps. More...
 
bool tighten () const
 Returns the option tighten. More...
 
void tighten (bool select)
 Sets option tighten to select. More...
 

Private Member Functions

void applyLongestPaths (const CompactionConstraintGraph< int > &D, NodeArray< int > &pos)
 
void computeCoords (const CompactionConstraintGraph< int > &D, NodeArray< int > &pos)
 
void moveComponents (const CompactionConstraintGraph< int > &D, NodeArray< int > &pos)
 

Private Attributes

NodeArray< int > m_component
 The pseudo component of a node. More...
 
int m_maxImprovementSteps
 The maximal number of improvement steps. More...
 
SList< nodem_pseudoSources
 The list of pseudo-sources. More...
 
bool m_tighten
 Tighten pseudo-components. More...
 

Detailed Description

Compaction algorithm using longest paths in the constraint graph.

Optional Parameters

OptionTypeDefaultDescription
tightenbooltrue if true, an additional improvement step tries to reduce the total edge length
max improvement stepsint0 the maximal number of steps performed by the improvement heuristic; 0 means no upper limit.

Definition at line 63 of file LongestPathCompaction.h.

Constructor & Destructor Documentation

◆ LongestPathCompaction()

ogdf::LongestPathCompaction::LongestPathCompaction ( bool  tighten = true,
int  maxImprovementSteps = 0 
)
explicit

Creates an instance of the longest path compaction algorithm.

Member Function Documentation

◆ applyLongestPaths()

void ogdf::LongestPathCompaction::applyLongestPaths ( const CompactionConstraintGraph< int > &  D,
NodeArray< int > &  pos 
)
private

◆ computeCoords()

void ogdf::LongestPathCompaction::computeCoords ( const CompactionConstraintGraph< int > &  D,
NodeArray< int > &  pos 
)
private

◆ constructiveHeuristics()

void ogdf::LongestPathCompaction::constructiveHeuristics ( PlanRep PG,
OrthoRep OR,
const RoutingChannel< int > &  rc,
GridLayoutMapped drawing 
)

Constructive heurisitic for orthogonal representations.

◆ improvementHeuristics()

void ogdf::LongestPathCompaction::improvementHeuristics ( PlanRep PG,
OrthoRep OR,
const RoutingChannel< int > &  rc,
GridLayoutMapped drawing 
)

Improvement heurisitic for orthogonal drawings.

◆ maxImprovementSteps() [1/2]

int ogdf::LongestPathCompaction::maxImprovementSteps ( ) const
inline

Returns the option max improvement steps.

Definition at line 90 of file LongestPathCompaction.h.

◆ maxImprovementSteps() [2/2]

void ogdf::LongestPathCompaction::maxImprovementSteps ( int  maxSteps)
inline

Sets the option max improvement steps.

Definition at line 87 of file LongestPathCompaction.h.

◆ moveComponents()

void ogdf::LongestPathCompaction::moveComponents ( const CompactionConstraintGraph< int > &  D,
NodeArray< int > &  pos 
)
private

◆ tighten() [1/2]

bool ogdf::LongestPathCompaction::tighten ( ) const
inline

Returns the option tighten.

Definition at line 84 of file LongestPathCompaction.h.

◆ tighten() [2/2]

void ogdf::LongestPathCompaction::tighten ( bool  select)
inline

Sets option tighten to select.

Definition at line 81 of file LongestPathCompaction.h.

Member Data Documentation

◆ m_component

NodeArray<int> ogdf::LongestPathCompaction::m_component
private

The pseudo component of a node.

Definition at line 106 of file LongestPathCompaction.h.

◆ m_maxImprovementSteps

int ogdf::LongestPathCompaction::m_maxImprovementSteps
private

The maximal number of improvement steps.

Definition at line 103 of file LongestPathCompaction.h.

◆ m_pseudoSources

SList<node> ogdf::LongestPathCompaction::m_pseudoSources
private

The list of pseudo-sources.

Definition at line 105 of file LongestPathCompaction.h.

◆ m_tighten

bool ogdf::LongestPathCompaction::m_tighten
private

Tighten pseudo-components.

Definition at line 102 of file LongestPathCompaction.h.


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