Multi edge inserter with approximation guarantee. More...
#include <ogdf/planarity/MultiEdgeApproxInserter.h>
Inheritance diagram for ogdf::MultiEdgeApproxInserter:Classes | |
| struct | VertexBlock |
Public Member Functions | |
| MultiEdgeApproxInserter () | |
| Creates an instance of multi-edge approx inserter with default option settings. More... | |
| MultiEdgeApproxInserter (const MultiEdgeApproxInserter &inserter) | |
Creates an instance of multi-edge approx inserter with the same settings as inserter. More... | |
| ~MultiEdgeApproxInserter () | |
| Destructor. More... | |
| virtual EdgeInsertionModule * | clone () const override |
| Returns a new instance of the multi-edge approx inserter with the same option settings. More... | |
| MultiEdgeApproxInserter & | operator= (const MultiEdgeApproxInserter &inserter) |
| Assignment operator. Copies option settings only. More... | |
| void | percentMostCrossedFix (double percent) |
Sets the option percentMostCrossed to percent. More... | |
| double | percentMostCrossedFix () const |
| Returns the current setting of option percentMostCrossed. More... | |
| void | percentMostCrossedVar (double percent) |
Sets the option percentMostCrossedVar to percent. More... | |
| double | percentMostCrossedVar () const |
| Returns the current setting of option percentMostCrossed (variable embedding). More... | |
| void | removeReinsertFix (RemoveReinsertType rrOption) |
| Sets the remove-reinsert postprocessing method. More... | |
| RemoveReinsertType | removeReinsertFix () const |
| Returns the current setting of the remove-reinsert postprocessing method. More... | |
| void | removeReinsertVar (RemoveReinsertType rrOption) |
| Sets the remove-reinsert postprocessing method. More... | |
| RemoveReinsertType | removeReinsertVar () const |
| Returns the current setting of the remove-reinsert postprocessing method. More... | |
| void | statistics (bool b) |
| bool | statistics () const |
| int | sumFEInsertionCosts () const |
| int | sumInsertionCosts () const |
Public Member Functions inherited from ogdf::EdgeInsertionModule | |
| EdgeInsertionModule () | |
| Initializes an edge insertion module (default constructor). More... | |
| EdgeInsertionModule (const EdgeInsertionModule &eim) | |
| Initializes an edge insertion module (copy constructor). More... | |
| virtual | ~EdgeInsertionModule () |
| Destructor. More... | |
| ReturnType | call (PlanRepLight &pr, const Array< edge > &origEdges) |
Inserts all edges in origEdges into pr. More... | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges) |
Inserts all edges in origEdges with given costs into pr. More... | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs) |
Inserts all edges in origEdges with given costs and subgraphs (for simultaneous drawing) into pr. More... | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges) |
Inserts all edges in origEdges with given forbidden edges into pr. More... | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges) |
Inserts all edges in origEdges with given costs and forbidden edges into pr. More... | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< int > &costOrig, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges, const EdgeArray< uint32_t > &edgeSubGraphs) |
Inserts all edges in origEdges with given costs, forbidden edges, and subgraphs (for simultaneous drawing) into pr. More... | |
| ReturnType | callEx (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr) |
Inserts all edges in origEdges into pr, optionally costs, forbidden edges, and subgraphs (for simultaneous drawing) 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 Types | |
| enum | PathDir { PathDir::Left, PathDir::Right, PathDir::None } |
Private Member Functions | |
| void | cleanup () |
| void | computePathBC (int k) |
| int | computePathSPQR (int b, node v, node w, int k) |
| MultiEdgeApproxInserter::Block * | constructBlock (int i) |
| void | constructDual (const PlanRepLight &pr) |
| node | copy (node vOrig, int b) |
| bool | dfsPathBlock (int b, node parent, int k, node t) |
| bool | dfsPathVertex (node v, int parent, int k, node t) |
| ReturnType | doCall (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *costOrig, const EdgeArray< bool > *forbiddenEdge, const EdgeArray< uint32_t > *edgeSubGraphs) override |
| Implements the algorithm call. More... | |
| void | embedBlock (int b, int m) |
| int | findShortestPath (node s, node t) |
| void | recFlipPref (adjEntry adjP, NodeArray< EmbeddingPreference > &pi_pick, const NodeArray< bool > &visited, StaticPlanarSPQRTree &spqr) |
Static Private Member Functions | |
| static bool | dfsPathSPQR (node v, node v2, edge eParent, List< edge > &path) |
Private Attributes | |
| Array< Block * > | m_block |
| NodeArray< SList< int > > | m_compV |
| NodeArray< SList< VertexBlock > > | m_copyInBlocks |
| const EdgeArray< int > * | m_costOrig |
| Graph | m_dual |
| ConstCombinatorialEmbedding | m_E |
| const Array< edge > * | m_edge |
| Array< SList< edge > > | m_edgesB |
| FaceArray< node > | m_faceNode |
| NodeArray< node > | m_GtoBC |
| Array< int > | m_insertionCosts |
| Array< List< VertexBlock > > | m_pathBCs |
| double | m_percentMostCrossedFix |
| The portion of most crossed edges considered (fixed embedding). More... | |
| double | m_percentMostCrossedVar |
| The portion of most crossed edges considered (variable embedding). More... | |
| PlanRepLight * | m_pPG |
| AdjEntryArray< adjEntry > | m_primalAdj |
| RemoveReinsertType | m_rrOptionFix |
| The remove-reinsert method for fixed embedding. More... | |
| RemoveReinsertType | m_rrOptionVar |
| The remove-reinsert method for variable embedding. More... | |
| bool | m_statistics |
| int | m_sumFEInsertionCosts |
| int | m_sumInsertionCosts |
| Array< SList< node > > | m_verticesB |
| node | m_vS |
| node | m_vT |
Static Private Attributes | |
| static PathDir | s_oppDir [3] |
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... | |
Multi edge inserter with approximation guarantee.
The implementation is based on the following publication:
Markus Chimani and Carsten Gutwenger: Advances in the Planarization Method: Effective Multiple Edge Insertions. Journal of Graph Algorithms and Applications (JGAA), 16(3), pp. 729-757, 2012.
Definition at line 52 of file MultiEdgeApproxInserter.h.
|
strongprivate |
| Enumerator | |
|---|---|
| Left | |
| Right | |
| None | |
Definition at line 130 of file MultiEdgeApproxInserter.h.
| ogdf::MultiEdgeApproxInserter::MultiEdgeApproxInserter | ( | ) |
Creates an instance of multi-edge approx inserter with default option settings.
| ogdf::MultiEdgeApproxInserter::MultiEdgeApproxInserter | ( | const MultiEdgeApproxInserter & | inserter | ) |
Creates an instance of multi-edge approx inserter with the same settings as inserter.
|
inline |
Destructor.
Definition at line 62 of file MultiEdgeApproxInserter.h.
|
private |
|
overridevirtual |
Returns a new instance of the multi-edge approx inserter with the same option settings.
Implements ogdf::EdgeInsertionModule.
|
private |
|
private |
|
private |
|
staticprivate |
|
overrideprivatevirtual |
Implements the algorithm call.
Implements ogdf::EdgeInsertionModule.
|
private |
| MultiEdgeApproxInserter& ogdf::MultiEdgeApproxInserter::operator= | ( | const MultiEdgeApproxInserter & | inserter | ) |
Assignment operator. Copies option settings only.
|
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 95 of file MultiEdgeApproxInserter.h.
|
inline |
Returns the current setting of option percentMostCrossed.
Definition at line 100 of file MultiEdgeApproxInserter.h.
|
inline |
Sets the option percentMostCrossedVar to percent.
This option determines the portion of most crossed edges used if the remove-reinsert method (variable embedding) is set to RemoveReinsertType::MostCrossed. This portion is number of edges * percentMostCrossed() / 100.
Definition at line 109 of file MultiEdgeApproxInserter.h.
|
inline |
Returns the current setting of option percentMostCrossed (variable embedding).
Definition at line 114 of file MultiEdgeApproxInserter.h.
|
private |
|
inline |
Sets the remove-reinsert postprocessing method.
Definition at line 71 of file MultiEdgeApproxInserter.h.
|
inline |
Returns the current setting of the remove-reinsert postprocessing method.
Definition at line 76 of file MultiEdgeApproxInserter.h.
|
inline |
Sets the remove-reinsert postprocessing method.
Definition at line 81 of file MultiEdgeApproxInserter.h.
|
inline |
Returns the current setting of the remove-reinsert postprocessing method.
Definition at line 86 of file MultiEdgeApproxInserter.h.
|
inline |
Definition at line 118 of file MultiEdgeApproxInserter.h.
|
inline |
Definition at line 122 of file MultiEdgeApproxInserter.h.
|
inline |
Definition at line 127 of file MultiEdgeApproxInserter.h.
|
inline |
Definition at line 126 of file MultiEdgeApproxInserter.h.
Definition at line 187 of file MultiEdgeApproxInserter.h.
Definition at line 178 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 182 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 176 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 198 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 197 of file MultiEdgeApproxInserter.h.
Definition at line 184 of file MultiEdgeApproxInserter.h.
Definition at line 180 of file MultiEdgeApproxInserter.h.
Definition at line 199 of file MultiEdgeApproxInserter.h.
Definition at line 181 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 186 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 185 of file MultiEdgeApproxInserter.h.
|
private |
The portion of most crossed edges considered (fixed embedding).
Definition at line 171 of file MultiEdgeApproxInserter.h.
|
private |
The portion of most crossed edges considered (variable embedding).
Definition at line 172 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 175 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 200 of file MultiEdgeApproxInserter.h.
|
private |
The remove-reinsert method for fixed embedding.
Definition at line 169 of file MultiEdgeApproxInserter.h.
|
private |
The remove-reinsert method for variable embedding.
Definition at line 170 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 173 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 191 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 190 of file MultiEdgeApproxInserter.h.
Definition at line 179 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 201 of file MultiEdgeApproxInserter.h.
|
private |
Definition at line 201 of file MultiEdgeApproxInserter.h.
|
staticprivate |
Definition at line 131 of file MultiEdgeApproxInserter.h.