Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::FixedEmbeddingInserter Class Reference

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. More...
 
 FixedEmbeddingInserter (const FixedEmbeddingInserter &inserter)
 Creates an instance of fixed embedding edge inserter with the same settings as inserter. More...
 
 ~FixedEmbeddingInserter ()
 Destructor. More...
 
virtual EdgeInsertionModuleclone () const override
 Returns a new instance of the fixed embedding inserter with the same option settings. More...
 
FixedEmbeddingInserteroperator= (const FixedEmbeddingInserter &inserter)
 Assignment operator. Copies option settings only. More...
 
Optional parameters
void removeReinsert (RemoveReinsertType rrOption)
 Sets the remove-reinsert postprocessing method. More...
 
RemoveReinsertType removeReinsert () const
 Returns the current setting of the remove-reinsert postprocessing method. More...
 
void percentMostCrossed (double percent)
 Sets the option percentMostCrossed to percent. More...
 
double percentMostCrossed () const
 Returns the current setting of option percentMostCrossed. More...
 
void keepEmbedding (bool keep)
 Sets the option keepEmbedding to keep. More...
 
bool keepEmbeding () const
 Returns the current setting of option keepEmbedding. More...
 
Further information
int runsPostprocessing () const
 Returns the number of runs performed by the remove-reinsert method after the algorithm has been called. More...
 
- 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< 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 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< 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 (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...
 

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. More...
 

Private Attributes

bool m_keepEmbedding
 
double m_percentMostCrossed
 The portion of most crossed edges considered. More...
 
RemoveReinsertType m_rrOption
 The remove-reinsert method. More...
 
int m_runsPostprocessing
 Runs of remove-reinsert method. 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

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 48 of file FixedEmbeddingInserter.h.

Constructor & Destructor Documentation

◆ FixedEmbeddingInserter() [1/2]

ogdf::FixedEmbeddingInserter::FixedEmbeddingInserter ( )

Creates an instance of fixed embedding edge inserter with default settings.

◆ FixedEmbeddingInserter() [2/2]

ogdf::FixedEmbeddingInserter::FixedEmbeddingInserter ( const FixedEmbeddingInserter inserter)

Creates an instance of fixed embedding edge inserter with the same settings as inserter.

◆ ~FixedEmbeddingInserter()

ogdf::FixedEmbeddingInserter::~FixedEmbeddingInserter ( )
inline

Destructor.

Definition at line 58 of file FixedEmbeddingInserter.h.

Member Function Documentation

◆ clone()

virtual EdgeInsertionModule* ogdf::FixedEmbeddingInserter::clone ( ) const
overridevirtual

Returns a new instance of the fixed embedding inserter with the same option settings.

Implements ogdf::EdgeInsertionModule.

◆ doCall()

virtual ReturnType ogdf::FixedEmbeddingInserter::doCall ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > *  costOrig,
const EdgeArray< bool > *  pForbiddenOrig,
const EdgeArray< uint32_t > *  pEdgeSubGraphs 
)
overrideprivatevirtual

Implements the algorithm call.

Implements ogdf::EdgeInsertionModule.

◆ keepEmbedding()

void ogdf::FixedEmbeddingInserter::keepEmbedding ( bool  keep)
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 107 of file FixedEmbeddingInserter.h.

◆ keepEmbeding()

bool ogdf::FixedEmbeddingInserter::keepEmbeding ( ) const
inline

Returns the current setting of option keepEmbedding.

Definition at line 112 of file FixedEmbeddingInserter.h.

◆ operator=()

FixedEmbeddingInserter& ogdf::FixedEmbeddingInserter::operator= ( const FixedEmbeddingInserter inserter)

Assignment operator. Copies option settings only.

◆ percentMostCrossed() [1/2]

double ogdf::FixedEmbeddingInserter::percentMostCrossed ( ) const
inline

Returns the current setting of option percentMostCrossed.

Definition at line 97 of file FixedEmbeddingInserter.h.

◆ percentMostCrossed() [2/2]

void ogdf::FixedEmbeddingInserter::percentMostCrossed ( double  percent)
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 92 of file FixedEmbeddingInserter.h.

◆ removeReinsert() [1/2]

RemoveReinsertType ogdf::FixedEmbeddingInserter::removeReinsert ( ) const
inline

Returns the current setting of the remove-reinsert postprocessing method.

Definition at line 82 of file FixedEmbeddingInserter.h.

◆ removeReinsert() [2/2]

void ogdf::FixedEmbeddingInserter::removeReinsert ( RemoveReinsertType  rrOption)
inline

Sets the remove-reinsert postprocessing method.

This might alter the input embedding.

Definition at line 77 of file FixedEmbeddingInserter.h.

◆ runsPostprocessing()

int ogdf::FixedEmbeddingInserter::runsPostprocessing ( ) const
inline

Returns the number of runs performed by the remove-reinsert method after the algorithm has been called.

Definition at line 122 of file FixedEmbeddingInserter.h.

Member Data Documentation

◆ m_keepEmbedding

bool ogdf::FixedEmbeddingInserter::m_keepEmbedding
private

Definition at line 139 of file FixedEmbeddingInserter.h.

◆ m_percentMostCrossed

double ogdf::FixedEmbeddingInserter::m_percentMostCrossed
private

The portion of most crossed edges considered.

Definition at line 138 of file FixedEmbeddingInserter.h.

◆ m_rrOption

RemoveReinsertType ogdf::FixedEmbeddingInserter::m_rrOption
private

The remove-reinsert method.

Definition at line 137 of file FixedEmbeddingInserter.h.

◆ m_runsPostprocessing

int ogdf::FixedEmbeddingInserter::m_runsPostprocessing
private

Runs of remove-reinsert method.

Definition at line 141 of file FixedEmbeddingInserter.h.


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