Inserts edges optimally into an embedding. More...
#include <ogdf/planarity/FixedEmbeddingInserter.h>
Inheritance diagram for ogdf::FixedEmbeddingInserter:Public Member Functions | |
| FixedEmbeddingInserter () | |
| Creates an instance of fixed embedding edge inserter with default settings. | |
| FixedEmbeddingInserter (const FixedEmbeddingInserter &inserter) | |
Creates an instance of fixed embedding edge inserter with the same settings as inserter. | |
| ~FixedEmbeddingInserter () | |
| Destructor. | |
| virtual EdgeInsertionModule * | clone () const override |
| Returns a new instance of the fixed embedding inserter with the same option settings. | |
| FixedEmbeddingInserter & | operator= (const FixedEmbeddingInserter &inserter) |
| Assignment operator. Copies option settings only. | |
Optional parameters | |
| void | removeReinsert (RemoveReinsertType rrOption) |
| Sets the remove-reinsert postprocessing method. | |
| RemoveReinsertType | removeReinsert () const |
| Returns the current setting of the remove-reinsert postprocessing method. | |
| void | percentMostCrossed (double percent) |
Sets the option percentMostCrossed to percent. | |
| double | percentMostCrossed () const |
| Returns the current setting of option percentMostCrossed. | |
| void | keepEmbedding (bool keep) |
Sets the option keepEmbedding to keep. | |
| bool | keepEmbeding () const |
| Returns the current setting of option keepEmbedding. | |
Further information | |
| int | runsPostprocessing () const |
| Returns the number of runs performed by the remove-reinsert method after the algorithm has been called. | |
Public Member Functions inherited from ogdf::EdgeInsertionModule | |
| EdgeInsertionModule () | |
| Initializes an edge insertion module (default constructor). | |
| EdgeInsertionModule (const EdgeInsertionModule &eim) | |
| Initializes an edge insertion module (copy constructor). | |
| virtual | ~EdgeInsertionModule () |
| Destructor. | |
| ReturnType | call (PlanRepLight &pr, const Array< edge > &origEdges) |
Inserts all edges in origEdges into pr. | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< bool > &forbiddenOrig, const Array< edge > &origEdges) |
Inserts all edges in origEdges with given forbidden edges into pr. | |
| ReturnType | call (PlanRepLight &pr, const EdgeArray< int > &costOrig, const Array< edge > &origEdges) |
Inserts all edges in origEdges with given costs into pr. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
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 | |
| Timeouter & | operator= (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. | |
Private Member Functions | |
| virtual ReturnType | doCall (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *costOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs) override |
| Implements the algorithm call. | |
Private Attributes | |
| bool | m_keepEmbedding |
| double | m_percentMostCrossed |
| The portion of most crossed edges considered. | |
| RemoveReinsertType | m_rrOption |
| The remove-reinsert method. | |
| int | m_runsPostprocessing |
| Runs of remove-reinsert method. | |
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... | |
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 Attributes inherited from ogdf::Timeouter | |
| double | m_timeLimit |
| Time limit for module calls (< 0 means no limit). | |
Inserts edges optimally into an embedding.
Iteratively inserts edges (optimally for each insertion step) into a possibly fixed embedding. Note that by default the embedding is not fixed and will be changed regardless of the input. If the input can be guaranteed to be a planar embedding you may flip keepEmbedding to preserve it.
Definition at line 54 of file FixedEmbeddingInserter.h.
| ogdf::FixedEmbeddingInserter::FixedEmbeddingInserter | ( | ) |
Creates an instance of fixed embedding edge inserter with default settings.
| ogdf::FixedEmbeddingInserter::FixedEmbeddingInserter | ( | const FixedEmbeddingInserter & | inserter | ) |
Creates an instance of fixed embedding edge inserter with the same settings as inserter.
|
inline |
Destructor.
Definition at line 63 of file FixedEmbeddingInserter.h.
|
overridevirtual |
Returns a new instance of the fixed embedding inserter with the same option settings.
Implements ogdf::EdgeInsertionModule.
|
overrideprivatevirtual |
Implements the algorithm call.
Implements ogdf::EdgeInsertionModule.
|
inline |
Sets the option keepEmbedding to keep.
This option determines if the planar embedding of the planarized representation PG passed to the call-method is preserved, or if always a new embedding is computed. If keepEmbedding is set to true, PG must always be planarly embedded.
Definition at line 102 of file FixedEmbeddingInserter.h.
|
inline |
Returns the current setting of option keepEmbedding.
Definition at line 105 of file FixedEmbeddingInserter.h.
| FixedEmbeddingInserter & ogdf::FixedEmbeddingInserter::operator= | ( | const FixedEmbeddingInserter & | inserter | ) |
Assignment operator. Copies option settings only.
|
inline |
Returns the current setting of option percentMostCrossed.
Definition at line 94 of file FixedEmbeddingInserter.h.
|
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 91 of file FixedEmbeddingInserter.h.
|
inline |
Returns the current setting of the remove-reinsert postprocessing method.
Definition at line 84 of file FixedEmbeddingInserter.h.
|
inline |
Sets the remove-reinsert postprocessing method.
This might alter the input embedding.
Definition at line 81 of file FixedEmbeddingInserter.h.
|
inline |
Returns the number of runs performed by the remove-reinsert method after the algorithm has been called.
Definition at line 113 of file FixedEmbeddingInserter.h.
|
private |
Definition at line 125 of file FixedEmbeddingInserter.h.
|
private |
The portion of most crossed edges considered.
Definition at line 124 of file FixedEmbeddingInserter.h.
|
private |
The remove-reinsert method.
Definition at line 123 of file FixedEmbeddingInserter.h.
|
private |
Runs of remove-reinsert method.
Definition at line 127 of file FixedEmbeddingInserter.h.