Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::UMLEdgeInsertionModule Class Referenceabstract

Interface for UML edge insertion algorithms. More...

#include <ogdf/uml/UMLEdgeInsertionModule.h>

+ Inheritance diagram for ogdf::UMLEdgeInsertionModule:

Public Member Functions

 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...
 
virtual UMLEdgeInsertionModuleclone () const =0
 Returns a new instance of the UML edge insertion module with the same option settings. 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 (bool t)
 timeout is turned off (false) or on (true) (with 0 second) More...
 
 Timeouter (const Timeouter &t)
 
 Timeouter (double t)
 timeout is set to the given value (seconds) More...
 
 ~Timeouter ()
 
bool isTimeLimit () const
 returns whether any time limit is set or not More...
 
Timeouteroperator= (const Timeouter &t)
 
double timeLimit () const
 returns the current time limit for the call More...
 
void timeLimit (bool t)
 shorthand to turn timelimit off or on (with 0 seconds) More...
 
void timeLimit (double t)
 sets the time limit for the call (in seconds); <0 means no limit. More...
 

Protected Member Functions

virtual ReturnType doCall (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs)=0
 Actual algorithm call that has to be implemented by derived classes. 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

Interface for UML edge insertion algorithms.

UML edge insertion algorithms take care that generalization edges do not cross in the resulting planarzation.

See also
SubgraphPlanarizerUML

Definition at line 53 of file UMLEdgeInsertionModule.h.

Constructor & Destructor Documentation

◆ UMLEdgeInsertionModule() [1/2]

ogdf::UMLEdgeInsertionModule::UMLEdgeInsertionModule ( )
inline

Initializes a UML edge insertion module (default constructor).

Definition at line 56 of file UMLEdgeInsertionModule.h.

◆ UMLEdgeInsertionModule() [2/2]

ogdf::UMLEdgeInsertionModule::UMLEdgeInsertionModule ( const UMLEdgeInsertionModule eim)
inline

Initializes a UML edge insertion module (copy constructor).

Definition at line 59 of file UMLEdgeInsertionModule.h.

◆ ~UMLEdgeInsertionModule()

virtual ogdf::UMLEdgeInsertionModule::~UMLEdgeInsertionModule ( )
inlinevirtual

Destructor.

Definition at line 62 of file UMLEdgeInsertionModule.h.

Member Function Documentation

◆ call() [1/2]

ReturnType ogdf::UMLEdgeInsertionModule::call ( PlanRepLight pr,
const Array< edge > &  origEdges 
)
inline

Inserts all edges in origEdges into pr while avoiding crossings between generalizations.

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 74 of file UMLEdgeInsertionModule.h.

◆ call() [2/2]

ReturnType ogdf::UMLEdgeInsertionModule::call ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > &  costOrig 
)
inline

Inserts all edges in origEdges with given costs into pr while avoiding crossings between generalizations.

Parameters
pris the input planarized representation and will also receive the result.
costOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 86 of file UMLEdgeInsertionModule.h.

◆ callEx()

ReturnType ogdf::UMLEdgeInsertionModule::callEx ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > *  pCostOrig = nullptr,
const EdgeArray< uint32_t > *  pEdgeSubGraphs = nullptr 
)
inline

Inserts all edges in origEdges into pr while avoiding crossings between generalizations, optionally costs and subgraphs may be given.

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
pCostOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs. May be a 0-pointer, in which case all edges have cost 1.
pEdgeSubGraphspoints to an edge array specifying to which subgraph an edge belongs. May be a 0-poiner, in which case no subgraphs / simultaneous embedding is used.
Returns
the status of the result.

Definition at line 101 of file UMLEdgeInsertionModule.h.

◆ clone()

virtual UMLEdgeInsertionModule* ogdf::UMLEdgeInsertionModule::clone ( ) const
pure virtual

Returns a new instance of the UML edge insertion module with the same option settings.

Implemented in ogdf::VariableEmbeddingInserterDynUML, ogdf::VariableEmbeddingInserterUML, and ogdf::FixedEmbeddingInserterUML.

◆ doCall()

virtual ReturnType ogdf::UMLEdgeInsertionModule::doCall ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > *  pCostOrig,
const EdgeArray< uint32_t > *  pEdgeSubGraphs 
)
protectedpure virtual

Actual algorithm call that has to be implemented by derived classes.

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
pCostOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs. May be a 0-pointer, in which case all edges have cost 1.
pEdgeSubGraphspoints to an edge array specifying to which subgraph an edge belongs. May be a 0-poiner, in which case no subgraphs / simultaneous embedding is used.
Returns
the status of the result.

Implemented in ogdf::FixedEmbeddingInserterUML, ogdf::VariableEmbeddingInserterDynUML, and ogdf::VariableEmbeddingInserterUML.


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