Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::UpwardPlanarizerModule Class Referenceabstract

Interface for upward planarization algorithms. More...

#include <ogdf/upward/UpwardPlanarizerModule.h>

+ Inheritance diagram for ogdf::UpwardPlanarizerModule:

Public Member Functions

 UpwardPlanarizerModule ()
 Initializes an upward planarizer module. More...
 
virtual ~UpwardPlanarizerModule ()
 
ReturnType call (UpwardPlanRep &UPR, const EdgeArray< int > *cost=nullptr, const EdgeArray< bool > *forbid=nullptr)
 Computes a upward planarized representation (UPR) of the input graph G. More...
 
ReturnType operator() (UpwardPlanRep &UPR, const EdgeArray< int > *cost=nullptr, const EdgeArray< bool > *forbid=nullptr)
 Computes a upward planarized representation of the input graph (shorthand for call) More...
 
bool useCost () const
 Returns true iff edge costs are given. More...
 
bool useForbid () const
 Returns true iff forbidden edges are given. More...
 
- Public Member Functions inherited from ogdf::Module
 Module ()
 Initializes a module. More...
 
virtual ~Module ()
 

Protected Member Functions

virtual ReturnType doCall (UpwardPlanRep &UPR, const EdgeArray< int > &cost, const EdgeArray< bool > &forbid)=0
 Computes an upward planarized representation of the input graph. More...
 

Private Attributes

bool m_useCost
 True iff edge costs are given. More...
 
bool m_useForbid
 True iff forbidden edges are given. 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...
 

Detailed Description

Interface for upward planarization algorithms.

Definition at line 46 of file UpwardPlanarizerModule.h.

Constructor & Destructor Documentation

◆ UpwardPlanarizerModule()

ogdf::UpwardPlanarizerModule::UpwardPlanarizerModule ( )
inline

Initializes an upward planarizer module.

Definition at line 49 of file UpwardPlanarizerModule.h.

◆ ~UpwardPlanarizerModule()

virtual ogdf::UpwardPlanarizerModule::~UpwardPlanarizerModule ( )
inlinevirtual

Definition at line 52 of file UpwardPlanarizerModule.h.

Member Function Documentation

◆ call()

ReturnType ogdf::UpwardPlanarizerModule::call ( UpwardPlanRep UPR,
const EdgeArray< int > *  cost = nullptr,
const EdgeArray< bool > *  forbid = nullptr 
)
inline

Computes a upward planarized representation (UPR) of the input graph G.

Parameters
UPRrepresents the input graph as well as the computed upward planarized representation after the call. The original graph of UPR has to be the input graph G. Crossings are replaced by dummy vertices. The UPR is finaly augmented to a st-graph. Since this augmentation, crossings dummies may not got an in- and outdegree of 2!
forbidpoints to an edge array indicating which edges are not allowed to be crossed, i.e., (*forbid)[e] = true. If forbid = 0, no edges are forbidden.
costpoints to an edge array that gives the cost of each edge. If cost = 0, all edges have cost 1.
Returns
the status of the result.

Definition at line 72 of file UpwardPlanarizerModule.h.

◆ doCall()

virtual ReturnType ogdf::UpwardPlanarizerModule::doCall ( UpwardPlanRep UPR,
const EdgeArray< int > &  cost,
const EdgeArray< bool > &  forbid 
)
protectedpure virtual

Computes an upward planarized representation of the input graph.

Parameters
UPRrepresents the input graph as well as the computed upward planarized representation after the call. The original graph of UPR has to be the input graph G. Crossings are replaced by dummy vertices. The UPR is finaly augmented to a st-graph. Since this augmentation, crossings dummies may not got an in- and outdegree of 2!
costpoints to an edge array that gives the cost of each edge. If cost = 0, all edges have cost 1.
forbidpoints to an edge array indicating which edges are not allowed to be crossed, i.e., (*forbid)[e] = true. If forbid = 0, no edges are forbidden.
Returns
the status of the result.

Implemented in ogdf::SubgraphUpwardPlanarizer.

◆ operator()()

ReturnType ogdf::UpwardPlanarizerModule::operator() ( UpwardPlanRep UPR,
const EdgeArray< int > *  cost = nullptr,
const EdgeArray< bool > *  forbid = nullptr 
)
inline

Computes a upward planarized representation of the input graph (shorthand for call)

Definition at line 97 of file UpwardPlanarizerModule.h.

◆ useCost()

bool ogdf::UpwardPlanarizerModule::useCost ( ) const
inline

Returns true iff edge costs are given.

Definition at line 103 of file UpwardPlanarizerModule.h.

◆ useForbid()

bool ogdf::UpwardPlanarizerModule::useForbid ( ) const
inline

Returns true iff forbidden edges are given.

Definition at line 106 of file UpwardPlanarizerModule.h.

Member Data Documentation

◆ m_useCost

bool ogdf::UpwardPlanarizerModule::m_useCost
private

True iff edge costs are given.

Definition at line 132 of file UpwardPlanarizerModule.h.

◆ m_useForbid

bool ogdf::UpwardPlanarizerModule::m_useForbid
private

True iff forbidden edges are given.

Definition at line 133 of file UpwardPlanarizerModule.h.


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