Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::UMLCrossingMinimizationModule Class Referenceabstract

Base class for UML crossing minimization algorithms. More...

#include <ogdf/uml/UMLCrossingMinimizationModule.h>

+ Inheritance diagram for ogdf::UMLCrossingMinimizationModule:

Public Member Functions

 UMLCrossingMinimizationModule ()
 Initializes a UML crossing minimization module (default constructor).
 
 UMLCrossingMinimizationModule (const UMLCrossingMinimizationModule &cmm)
 Initializes a UML crossing minimization module (copy constructor).
 
virtual ~UMLCrossingMinimizationModule ()
 Destructor.
 
ReturnType call (PlanRepUML &prUML, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr)
 Computes a planarized representation of the input graph.
 
virtual UMLCrossingMinimizationModuleclone () const =0
 Returns a new instance of the UML crossing minimization module with the same option settings.
 
ReturnType operator() (PlanRepUML &prUML, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr)
 Computes a planarized representation of the input graph.
 
- 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.
 

Static Public Member Functions

static bool checkCrossingGens (const PlanRepUML &prUML)
 Checks if the planarized represenation contains crossing generalizations.
 
- 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 Member Functions

virtual ReturnType doCall (PlanRepUML &prUML, int cc, const EdgeArray< int > *pCostOrig, int &crossingNumber)=0
 Actual algorithm call that needs to be implemented by derived classes.
 

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...
 
- Protected Attributes inherited from ogdf::Timeouter
double m_timeLimit
 Time limit for module calls (< 0 means no limit).
 

Detailed Description

Base class for UML crossing minimization algorithms.

Definition at line 41 of file UMLCrossingMinimizationModule.h.

Constructor & Destructor Documentation

◆ UMLCrossingMinimizationModule() [1/2]

ogdf::UMLCrossingMinimizationModule::UMLCrossingMinimizationModule ( )
inline

Initializes a UML crossing minimization module (default constructor).

Definition at line 44 of file UMLCrossingMinimizationModule.h.

◆ UMLCrossingMinimizationModule() [2/2]

ogdf::UMLCrossingMinimizationModule::UMLCrossingMinimizationModule ( const UMLCrossingMinimizationModule cmm)
inline

Initializes a UML crossing minimization module (copy constructor).

Definition at line 47 of file UMLCrossingMinimizationModule.h.

◆ ~UMLCrossingMinimizationModule()

virtual ogdf::UMLCrossingMinimizationModule::~UMLCrossingMinimizationModule ( )
inlinevirtual

Destructor.

Definition at line 50 of file UMLCrossingMinimizationModule.h.

Member Function Documentation

◆ call()

ReturnType ogdf::UMLCrossingMinimizationModule::call ( PlanRepUML prUML,
int  cc,
int crossingNumber,
const EdgeArray< int > *  pCostOrig = nullptr 
)
inline

Computes a planarized representation of the input graph.

Parameters
prUMLrepresents the input graph as well as the computed planarized representation after the call. prUML has to be initialzed as a PlanRep of the input graph and is modified to obatain the planarized representation (crossings are replaced by dummy vertices with degree four).
ccis the index of the connected component in prUML that is considered.
crossingNumberis assigned the number of crossings.
pCostOrigpoints to an edge array (of the original graph) that gives the cost of each edge. May be a 0-pointer, in which case all edges have cost 1.
Returns
the status of the result.

Definition at line 67 of file UMLCrossingMinimizationModule.h.

◆ checkCrossingGens()

static bool ogdf::UMLCrossingMinimizationModule::checkCrossingGens ( const PlanRepUML prUML)
static

Checks if the planarized represenation contains crossing generalizations.

◆ clone()

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

Returns a new instance of the UML crossing minimization module with the same option settings.

Implemented in ogdf::SubgraphPlanarizerUML.

◆ doCall()

virtual ReturnType ogdf::UMLCrossingMinimizationModule::doCall ( PlanRepUML prUML,
int  cc,
const EdgeArray< int > *  pCostOrig,
int crossingNumber 
)
protectedpure virtual

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

Parameters
prUMLrepresents the input graph as well as the computed planarized representation after the call. prUML has to be initialzed as a PlanRep of the input graph and is modified to obatain the planarized representation (crossings are replaced by dummy vertices with degree four).
ccis the index of the connected component in prUML that is considered.
crossingNumberis assigned the number of crossings.
pCostOrigpoints to an edge array (of the original graph) that gives the cost of each edge. May be a 0-pointer, in which case all edges have cost 1.
Returns
the status of the result.

Implemented in ogdf::SubgraphPlanarizerUML.

◆ operator()()

ReturnType ogdf::UMLCrossingMinimizationModule::operator() ( PlanRepUML prUML,
int  cc,
int crossingNumber,
const EdgeArray< int > *  pCostOrig = nullptr 
)
inline

Computes a planarized representation of the input graph.

Parameters
prUMLrepresents the input graph as well as the computed planarized representation after the call. prUML has to be initialzed as a PlanRep of the input graph and is modified to obatain the planarized representation (crossings are replaced by dummy vertices with degree four).
ccis the index of the connected component in prUML that is considered.
crossingNumberis assigned the number of crossings.
pCostOrigpoints to an edge array (of the original graph) that gives the cost of each edge. May be a 0-pointer, in which case all edges have cost 1.
Returns
the status of the result.

Definition at line 84 of file UMLCrossingMinimizationModule.h.


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