52template<
typename TCost>
59#ifdef OGDF_MEMORY_POOL_NTS
75 List<edge>& delEdges,
bool preferredImplyPlanar =
false) {
76 return doCall(G, preferredEdges, delEdges, &cost, preferredImplyPlanar);
87 bool preferredImplyPlanar =
false) {
88 return doCall(G, preferredEdges, delEdges,
nullptr, preferredImplyPlanar);
99 return doCall(G, preferredEdges, delEdges, &cost);
109 return doCall(G, preferredEdges, delEdges);
114 bool preferredImplyPlanar =
false) {
115 return call(G, preferredEdges, delEdges, preferredImplyPlanar);
129 List<edge>& delOrigEdges,
bool preferredImplyPlanar =
false) {
131 ReturnType retValue =
call(GC, preferredEdges, delEdges, preferredImplyPlanar);
133 for (
edge eCopy : delEdges) {
159#ifndef OGDF_MEMORY_POOL_NTS
182 const EdgeArray<TCost>* pCost =
nullptr,
bool preferredImplyPlanar =
false) = 0;
Includes declaration of graph class.
Declaration of graph copy classes.
Declaration of doubly linked lists and iterators.
Declares base class for all module types.
Declaration of Thread class representing threads.
Declares base class for modules with timeout functionality.
Basic declarations, included by all source files.
Class for the representation of edges.
const Graph & original() const
Returns a reference to the original graph.
Copies of graphs supporting edge splitting.
void delEdge(edge e) override
Removes edge e and clears the list of edges corresponding to e's original edge.
Data type for general directed graphs (adjacency list representation).
Doubly linked lists (maintaining the length of the list).
iterator pushBack(const E &x)
Adds element x at the end of the list.
ReturnType
The return type of a module.
static bool isSolution(ReturnType ret)
Returns true iff ret indicates that the module returned a feasible solution.
Interface for planar subgraph algorithms.
ReturnType call(const Graph &G, const EdgeArray< TCost > &cost, List< edge > &delEdges)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
unsigned int maxThreads() const
Returns the maximal number of used threads.
ReturnType call(const Graph &G, const EdgeArray< TCost > &cost, const List< edge > &preferredEdges, List< edge > &delEdges, bool preferredImplyPlanar=false)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
virtual ReturnType doCall(const Graph &G, const List< edge > &preferredEdges, List< edge > &delEdges, const EdgeArray< TCost > *pCost=nullptr, bool preferredImplyPlanar=false)=0
Computes the set of edges delEdges which have to be deleted to obtain the planar subgraph.
void maxThreads(unsigned int n)
Sets the maximal number of used threads to n.
ReturnType callAndDelete(GraphCopy &GC, List< edge > &delOrigEdges)
Makes G planar by deleting edges.
ReturnType operator()(const Graph &G, List< edge > &delEdges)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
unsigned int m_maxThreads
The maximal number of used threads.
ReturnType call(const Graph &G, const List< edge > &preferredEdges, List< edge > &delEdges, bool preferredImplyPlanar=false)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
PlanarSubgraphModule()
Initializes a planar subgraph module (default constructor).
ReturnType operator()(const Graph &G, const List< edge > &preferredEdges, List< edge > &delEdges, bool preferredImplyPlanar=false)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
virtual PlanarSubgraphModule * clone() const =0
Returns a new instance of the planar subgraph module with the same option settings.
ReturnType callAndDelete(GraphCopy &GC, const List< edge > &preferredEdges, List< edge > &delOrigEdges, bool preferredImplyPlanar=false)
Makes GC planar by deleting edges.
ReturnType call(const Graph &G, List< edge > &delEdges)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
class for timeout funtionality.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Declaration of memory manager for allocating small pieces of memory.
The namespace for all OGDF objects.