Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::VariableEmbeddingInserterUML Class Reference

Optimal edge insertion module. More...

#include <ogdf/uml/VariableEmbeddingInserterUML.h>

+ Inheritance diagram for ogdf::VariableEmbeddingInserterUML:

Public Member Functions

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

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. More...
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from ogdf::Module
enum  ReturnType { ReturnType::Feasible, ReturnType::Optimal, ReturnType::NoFeasibleSolution, ReturnType::TimeoutFeasible, ReturnType::TimeoutInfeasible, ReturnType::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. More...
 
- Protected Attributes inherited from ogdf::Timeouter
double m_timeLimit
 Time limit for module calls (< 0 means no limit). More...
 

Detailed Description

Optimal edge insertion module.

The class VariableEmbeddingInserterUML 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 53 of file VariableEmbeddingInserterUML.h.

Constructor & Destructor Documentation

◆ VariableEmbeddingInserterUML() [1/2]

ogdf::VariableEmbeddingInserterUML::VariableEmbeddingInserterUML ( )

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

◆ VariableEmbeddingInserterUML() [2/2]

ogdf::VariableEmbeddingInserterUML::VariableEmbeddingInserterUML ( const VariableEmbeddingInserterUML &  inserter)

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

◆ ~VariableEmbeddingInserterUML()

ogdf::VariableEmbeddingInserterUML::~VariableEmbeddingInserterUML ( )
inline

Destructor.

Definition at line 63 of file VariableEmbeddingInserterUML.h.

Member Function Documentation

◆ clone()

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

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

Implements ogdf::UMLEdgeInsertionModule.

◆ doCall()

virtual ReturnType ogdf::VariableEmbeddingInserterUML::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=()

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

Assignment operator. Copies option settings only.

◆ percentMostCrossed() [1/2]

void ogdf::VariableEmbeddingInserterUML::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 93 of file VariableEmbeddingInserterUML.h.

◆ percentMostCrossed() [2/2]

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

Returns the current setting of option percentMostCrossed.

Definition at line 98 of file VariableEmbeddingInserterUML.h.

◆ removeReinsert() [1/2]

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

Sets the remove-reinsert postprocessing method.

Definition at line 78 of file VariableEmbeddingInserterUML.h.

◆ removeReinsert() [2/2]

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

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

Definition at line 83 of file VariableEmbeddingInserterUML.h.

Member Data Documentation

◆ m_percentMostCrossed

double ogdf::VariableEmbeddingInserterUML::m_percentMostCrossed
private

The portion of most crossed edges considered.

Definition at line 113 of file VariableEmbeddingInserterUML.h.

◆ m_rrOption

RemoveReinsertType ogdf::VariableEmbeddingInserterUML::m_rrOption
private

The remove-reinsert method.

Definition at line 112 of file VariableEmbeddingInserterUML.h.


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