Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::VariableEmbeddingInserterDynUML Class Reference

Optimal edge insertion module. More...

#include <ogdf/uml/VariableEmbeddingInserterDynUML.h>

+ Inheritance diagram for ogdf::VariableEmbeddingInserterDynUML:

Public Member Functions

 VariableEmbeddingInserterDynUML ()
 Creates an instance of variable embedding edge inserter with default settings.
 
 VariableEmbeddingInserterDynUML (const VariableEmbeddingInserterDynUML &inserter)
 Creates an instance of variable embedding inserter with the same settings as inserter.
 
 ~VariableEmbeddingInserterDynUML ()
 Destructor.
 
virtual UMLEdgeInsertionModuleclone () const override
 Returns a new instance of the variable embedding inserter with the same option settings.
 
VariableEmbeddingInserterDynUMLoperator= (const VariableEmbeddingInserterDynUML &inserter)
 Assignment operator. Copies option settings only.
 
Optional parameters
void removeReinsert (RemoveReinsertType rrOption)
 Sets the remove-reinsert postprocessing method.
 
RemoveReinsertType removeReinsert () const
 Returns the current setting of the remove-reinsert postprocessing method.
 
void percentMostCrossed (double percent)
 Sets the option percentMostCrossed to percent.
 
double percentMostCrossed () const
 Returns the current setting of option percentMostCrossed.
 
- Public Member Functions inherited from ogdf::UMLEdgeInsertionModule
 UMLEdgeInsertionModule ()
 Initializes a UML edge insertion module (default constructor).
 
 UMLEdgeInsertionModule (const UMLEdgeInsertionModule &eim)
 Initializes a UML edge insertion module (copy constructor).
 
virtual ~UMLEdgeInsertionModule ()
 Destructor.
 
ReturnType call (PlanRepLight &pr, const Array< edge > &origEdges)
 Inserts all edges in origEdges into pr while avoiding crossings between generalizations.
 
ReturnType call (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > &costOrig)
 Inserts all edges in origEdges with given costs into pr while avoiding crossings between generalizations.
 
ReturnType callEx (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
 Inserts all edges in origEdges into pr while avoiding crossings between generalizations, optionally costs and subgraphs may be given.
 
- Public Member Functions inherited from ogdf::Module
 Module ()
 Initializes a module.
 
virtual ~Module ()
 
- Public Member Functions inherited from ogdf::Timeouter
 Timeouter ()
 timeout is turned of by default
 
 Timeouter (bool t)
 timeout is turned off (false) or on (true) (with 0 second)
 
 Timeouter (const Timeouter &t)
 
 Timeouter (double t)
 timeout is set to the given value (seconds)
 
 ~Timeouter ()
 
bool isTimeLimit () const
 returns whether any time limit is set or not
 
Timeouteroperator= (const Timeouter &t)
 
double timeLimit () const
 returns the current time limit for the call
 
void timeLimit (bool t)
 shorthand to turn timelimit off or on (with 0 seconds)
 
void timeLimit (double t)
 sets the time limit for the call (in seconds); <0 means no limit.
 

Private Member Functions

virtual ReturnType doCall (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubgraph) override
 Implements the algorithm call.
 

Private Attributes

double m_percentMostCrossed
 The portion of most crossed edges considered.
 
RemoveReinsertType m_rrOption
 The remove-reinsert method.
 

Additional Inherited Members

- Public Types inherited from ogdf::Module
enum class  ReturnType { Feasible , Optimal , NoFeasibleSolution , TimeoutFeasible , TimeoutInfeasible , Error }
 The return type of a module. More...
 
- Static Public Member Functions inherited from ogdf::Module
static bool isSolution (ReturnType ret)
 Returns true iff ret indicates that the module returned a feasible solution.
 
- Protected Attributes inherited from ogdf::Timeouter
double m_timeLimit
 Time limit for module calls (< 0 means no limit).
 

Detailed Description

Optimal edge insertion module.

The class VariableEmbeddingInserterDynUML represents the optimal edge insertion algorithm, which inserts a single edge with a minum number of crossings into a planar graph. This version is specialized for UML class diagrams and makes sure that generalization edges do not cross.

The implementation is based on the following publication:

Carsten Gutwenger, Petra Mutzel, Rene Weiskircher: Inserting an Edge into a Planar Graph. Algorithmica 41(4), pp. 289-308, 2005.

Definition at line 51 of file VariableEmbeddingInserterDynUML.h.

Constructor & Destructor Documentation

◆ VariableEmbeddingInserterDynUML() [1/2]

ogdf::VariableEmbeddingInserterDynUML::VariableEmbeddingInserterDynUML ( )

Creates an instance of variable embedding edge inserter with default settings.

◆ VariableEmbeddingInserterDynUML() [2/2]

ogdf::VariableEmbeddingInserterDynUML::VariableEmbeddingInserterDynUML ( const VariableEmbeddingInserterDynUML inserter)

Creates an instance of variable embedding inserter with the same settings as inserter.

◆ ~VariableEmbeddingInserterDynUML()

ogdf::VariableEmbeddingInserterDynUML::~VariableEmbeddingInserterDynUML ( )
inline

Destructor.

Definition at line 60 of file VariableEmbeddingInserterDynUML.h.

Member Function Documentation

◆ clone()

virtual UMLEdgeInsertionModule * ogdf::VariableEmbeddingInserterDynUML::clone ( ) const
overridevirtual

Returns a new instance of the variable embedding inserter with the same option settings.

Implements ogdf::UMLEdgeInsertionModule.

◆ doCall()

virtual ReturnType ogdf::VariableEmbeddingInserterDynUML::doCall ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > *  pCostOrig,
const EdgeArray< uint32_t > *  pEdgeSubgraph 
)
overrideprivatevirtual

Implements the algorithm call.

Implements ogdf::UMLEdgeInsertionModule.

◆ operator=()

VariableEmbeddingInserterDynUML & ogdf::VariableEmbeddingInserterDynUML::operator= ( const VariableEmbeddingInserterDynUML inserter)

Assignment operator. Copies option settings only.

◆ percentMostCrossed() [1/2]

double ogdf::VariableEmbeddingInserterDynUML::percentMostCrossed ( ) const
inline

Returns the current setting of option percentMostCrossed.

Definition at line 87 of file VariableEmbeddingInserterDynUML.h.

◆ percentMostCrossed() [2/2]

void ogdf::VariableEmbeddingInserterDynUML::percentMostCrossed ( double  percent)
inline

Sets the option percentMostCrossed to percent.

This option determines the portion of most crossed edges used if the remove-reinsert method is set to RemoveReinsertType::MostCrossed. This portion is number of edges * percentMostCrossed() / 100.

Definition at line 84 of file VariableEmbeddingInserterDynUML.h.

◆ removeReinsert() [1/2]

RemoveReinsertType ogdf::VariableEmbeddingInserterDynUML::removeReinsert ( ) const
inline

Returns the current setting of the remove-reinsert postprocessing method.

Definition at line 77 of file VariableEmbeddingInserterDynUML.h.

◆ removeReinsert() [2/2]

void ogdf::VariableEmbeddingInserterDynUML::removeReinsert ( RemoveReinsertType  rrOption)
inline

Sets the remove-reinsert postprocessing method.

Definition at line 74 of file VariableEmbeddingInserterDynUML.h.

Member Data Documentation

◆ m_percentMostCrossed

double ogdf::VariableEmbeddingInserterDynUML::m_percentMostCrossed
private

The portion of most crossed edges considered.

Definition at line 97 of file VariableEmbeddingInserterDynUML.h.

◆ m_rrOption

RemoveReinsertType ogdf::VariableEmbeddingInserterDynUML::m_rrOption
private

The remove-reinsert method.

Definition at line 96 of file VariableEmbeddingInserterDynUML.h.


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