Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

Interface for edge insertion algorithms. More...

#include <ogdf/planarity/EdgeInsertionModule.h>

+ Inheritance diagram for ogdf::EdgeInsertionModule:

Public Member Functions

 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.
 
virtual EdgeInsertionModuleclone () const =0
 Returns a new instance of the edge insertion module with the same option settings.
 
- 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.
 

Protected Member Functions

virtual ReturnType doCall (PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig, const EdgeArray< bool > *pForbiddenOrig, const EdgeArray< uint32_t > *pEdgeSubGraphs)=0
 Actual algorithm call that has 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...
 
- 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).
 

Detailed Description

Interface for edge insertion algorithms.

See also
SubgraphPlanarizer

Definition at line 45 of file EdgeInsertionModule.h.

Constructor & Destructor Documentation

◆ EdgeInsertionModule() [1/2]

ogdf::EdgeInsertionModule::EdgeInsertionModule ( )
inline

Initializes an edge insertion module (default constructor).

Definition at line 48 of file EdgeInsertionModule.h.

◆ EdgeInsertionModule() [2/2]

ogdf::EdgeInsertionModule::EdgeInsertionModule ( const EdgeInsertionModule eim)
inline

Initializes an edge insertion module (copy constructor).

Definition at line 51 of file EdgeInsertionModule.h.

◆ ~EdgeInsertionModule()

virtual ogdf::EdgeInsertionModule::~EdgeInsertionModule ( )
inlinevirtual

Destructor.

Definition at line 54 of file EdgeInsertionModule.h.

Member Function Documentation

◆ call() [1/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const Array< edge > &  origEdges 
)
inline

Inserts all edges in origEdges into pr.

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 66 of file EdgeInsertionModule.h.

◆ call() [2/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const EdgeArray< bool > &  forbiddenOrig,
const Array< edge > &  origEdges 
)
inline

Inserts all edges in origEdges with given forbidden edges into pr.

Precondition
No forbidden edge may be in origEdges.
Parameters
pris the input planarized representation and will also receive the result.
forbiddenOrigis an edge array indicating if an original edge is forbidden to be crossed.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 108 of file EdgeInsertionModule.h.

◆ call() [3/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const EdgeArray< int > &  costOrig,
const Array< edge > &  origEdges 
)
inline

Inserts all edges in origEdges with given costs into pr.

Parameters
pris the input planarized representation and will also receive the result.
costOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 79 of file EdgeInsertionModule.h.

◆ call() [4/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const EdgeArray< int > &  costOrig,
const Array< edge > &  origEdges,
const EdgeArray< uint32_t > &  edgeSubGraphs 
)
inline

Inserts all edges in origEdges with given costs and subgraphs (for simultaneous drawing) into pr.

Parameters
pris the input planarized representation and will also receive the result.
costOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
edgeSubGraphsis an edge array specifying to which subgraph an edge belongs.
Returns
the status of the result.

Definition at line 93 of file EdgeInsertionModule.h.

◆ call() [5/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const EdgeArray< int > &  costOrig,
const EdgeArray< bool > &  forbiddenOrig,
const Array< edge > &  origEdges 
)
inline

Inserts all edges in origEdges with given costs and forbidden edges into pr.

Precondition
No forbidden edge may be in origEdges.
Parameters
pris the input planarized representation and will also receive the result.
costOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
forbiddenOrigis an edge array indicating if an original edge is forbidden to be crossed.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
Returns
the status of the result.

Definition at line 125 of file EdgeInsertionModule.h.

◆ call() [6/6]

ReturnType ogdf::EdgeInsertionModule::call ( PlanRepLight pr,
const EdgeArray< int > &  costOrig,
const EdgeArray< bool > &  forbiddenOrig,
const Array< edge > &  origEdges,
const EdgeArray< uint32_t > &  edgeSubGraphs 
)
inline

Inserts all edges in origEdges with given costs, forbidden edges, and subgraphs (for simultaneous drawing) into pr.

Precondition
No forbidden edge may be in origEdges.
Parameters
pris the input planarized representation and will also receive the result.
costOrigis an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
forbiddenOrigis an edge array indicating if an original edge is forbidden to be crossed.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
edgeSubGraphsis an edge array specifying to which subgraph an edge belongs.
Returns
the status of the result.

Definition at line 143 of file EdgeInsertionModule.h.

◆ callEx()

ReturnType ogdf::EdgeInsertionModule::callEx ( PlanRepLight pr,
const Array< edge > &  origEdges,
const EdgeArray< int > *  pCostOrig = nullptr,
const EdgeArray< bool > *  pForbiddenOrig = nullptr,
const EdgeArray< uint32_t > *  pEdgeSubGraphs = nullptr 
)
inline

Inserts all edges in origEdges into pr, optionally costs, forbidden edges, and subgraphs (for simultaneous drawing) may be given.

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
pCostOrigpoints to an edge array containing the costs of original edges; edges in pr without an original edge have zero costs. May be a 0-pointer, in which case all edges have cost 1.
pForbiddenOrigpoints to an edge array indicating whether an original edge is forbidden to be crossed. May be a 0-pointer, in which case no edges are forbidden.
pEdgeSubGraphspoints to an edge array specifying to which subgraph an edge belongs. May be a 0-poiner, in which case no subgraphs / simultaneous embedding is used.
Returns
the status of the result.

Definition at line 162 of file EdgeInsertionModule.h.

◆ clone()

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

Returns a new instance of the edge insertion module with the same option settings.

Implemented in ogdf::FixedEmbeddingInserter, ogdf::MultiEdgeApproxInserter, ogdf::VariableEmbeddingInserter, and ogdf::VariableEmbeddingInserterDyn.

◆ doCall()

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

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

Parameters
pris the input planarized representation and will also receive the result.
origEdgesis the array of original edges (edges in the original graph of pr) that have to be inserted.
pCostOrigpoints to an edge array containing the costs of original edges; edges in pr without an original edge have zero costs.
pForbiddenOrigpoints to an edge array indicating whether an original edge is forbidden to be crossed.
pEdgeSubGraphspoints to an edge array specifying to which subgraph an edge belongs.
Returns
the status of the result.

Implemented in ogdf::VariableEmbeddingInserter, ogdf::MultiEdgeApproxInserter, ogdf::FixedEmbeddingInserter, and ogdf::VariableEmbeddingInserterDyn.


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