Base class for crossing minimization algorithms.
More...
#include <ogdf/planarity/CrossingMinimizationModule.h>
|
| CrossingMinimizationModule () |
| Initializes a crossing minimization module (default constructor). More...
|
|
| CrossingMinimizationModule (const CrossingMinimizationModule &cmm) |
| Initializes an crossing minimization module (copy constructor). More...
|
|
virtual | ~CrossingMinimizationModule () |
| Destructor. More...
|
|
ReturnType | call (PlanRep &pr, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr) |
| Computes a planarized representation of the input graph. More...
|
|
virtual CrossingMinimizationModule * | clone () const =0 |
| Returns a new instance of the crossing minimization module with the same option settings. More...
|
|
ReturnType | operator() (PlanRep &pr, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr) |
| Computes a planarized representation of the input graph. More...
|
|
| Module () |
| Initializes a module. More...
|
|
virtual | ~Module () |
|
| 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...
|
|
Timeouter & | operator= (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...
|
|
Base class for crossing minimization algorithms.
Definition at line 48 of file CrossingMinimizationModule.h.
◆ CrossingMinimizationModule() [1/2]
ogdf::CrossingMinimizationModule::CrossingMinimizationModule |
( |
| ) |
|
|
inline |
◆ CrossingMinimizationModule() [2/2]
◆ ~CrossingMinimizationModule()
virtual ogdf::CrossingMinimizationModule::~CrossingMinimizationModule |
( |
| ) |
|
|
inlinevirtual |
◆ call()
ReturnType ogdf::CrossingMinimizationModule::call |
( |
PlanRep & |
pr, |
|
|
int |
cc, |
|
|
int & |
crossingNumber, |
|
|
const EdgeArray< int > * |
pCostOrig = nullptr , |
|
|
const EdgeArray< bool > * |
pForbiddenOrig = nullptr , |
|
|
const EdgeArray< uint32_t > * |
pEdgeSubGraphs = nullptr |
|
) |
| |
|
inline |
Computes a planarized representation of the input graph.
- Parameters
-
pr | represents the input graph as well as the computed planarized representation after the call. pr 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). |
cc | is the index of the connected component in pr that is considered. |
crossingNumber | is assigned the number of crossings. |
pCostOrig | points 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. |
pForbiddenOrig | points to an edge array (of the original graph) specifying which edges are not allowed to be crossed. May be a 0-pointer, in which case no edges are forbidden. |
pEdgeSubGraphs | points to an edge array (of the original graph) specifying to which subgraph an edge belongs. |
- Returns
- the status of the result.
Definition at line 77 of file CrossingMinimizationModule.h.
◆ clone()
◆ computeCrossingNumber()
static int ogdf::CrossingMinimizationModule::computeCrossingNumber |
( |
GraphCopy & |
graphCopy, |
|
|
const EdgeArray< int > * |
pCost, |
|
|
const EdgeArray< uint32_t > * |
pEdgeSubGraphs |
|
) |
| |
|
inlinestaticprotected |
Computes the (weighted) crossing number of the planarization graphCopy
.
- Parameters
-
graphCopy | represents the planarization of an original graph. |
pCost | points to an edge array (of the original graph) with the cost of each edge. May be nullptr, in which case all edges have cost 1. |
pEdgeSubGraphs | points to an edge array (of the original graph) specifying to which subgraph an edge belongs. |
- Returns
- the (weighted) crossing number of
graphCopy
.
Definition at line 136 of file CrossingMinimizationModule.h.
◆ doCall()
virtual ReturnType ogdf::CrossingMinimizationModule::doCall |
( |
PlanRep & |
pr, |
|
|
int |
cc, |
|
|
const EdgeArray< int > * |
pCostOrig, |
|
|
const EdgeArray< bool > * |
pForbiddenOrig, |
|
|
const EdgeArray< uint32_t > * |
pEdgeSubGraphs, |
|
|
int & |
crossingNumber |
|
) |
| |
|
protectedpure virtual |
Actual algorithm call that needs to be implemented by derived classes.
- Parameters
-
pr | represents the input graph as well as the computed planarized representation after the call. pr 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). |
cc | is the index of the connected component in pr that is considered. |
crossingNumber | is assigned the number of crossings. |
pCostOrig | points 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. |
pForbiddenOrig | points to an edge array (of the original graph) specifying which edges are not allowed to be crossed. May be a 0-pointer, in which case no edges are forbidden. |
pEdgeSubGraphs | points to an edge array (of the original graph) specifying to which subgraph an edge belongs. |
- Returns
- the status of the result.
Implemented in ogdf::PlanarizerStarReinsertion, ogdf::SubgraphPlanarizer, ogdf::PlanarizerMixedInsertion, and ogdf::PlanarizerChordlessCycle.
◆ operator()()
ReturnType ogdf::CrossingMinimizationModule::operator() |
( |
PlanRep & |
pr, |
|
|
int |
cc, |
|
|
int & |
crossingNumber, |
|
|
const EdgeArray< int > * |
pCostOrig = nullptr , |
|
|
const EdgeArray< bool > * |
pForbiddenOrig = nullptr , |
|
|
const EdgeArray< uint32_t > * |
pEdgeSubGraphs = nullptr |
|
) |
| |
|
inline |
Computes a planarized representation of the input graph.
- Parameters
-
pr | represents the input graph as well as the computed planarized representation after the call. pr 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). |
cc | is the index of the connected component in pr that is considered. |
crossingNumber | is assigned the number of crossings. |
pCostOrig | points 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. |
pForbiddenOrig | points to an edge array (of the original graph) specifying which edges are not allowed to be crossed. May be a 0-pointer, in which case no edges are forbidden. |
pEdgeSubGraphs | points to an edge array (of the original graph) specifying to which subgraph an edge belongs. |
- Returns
- the status of the result.
Definition at line 99 of file CrossingMinimizationModule.h.
The documentation for this class was generated from the following file: