48 template<
typename TCost>
56 #ifdef OGDF_MEMORY_POOL_NTS 59 m_maxThreads = max(1u, Thread::hardware_concurrency());
84 bool preferredImplyPlanar =
false)
86 return doCall(G,preferredEdges,delEdges,&cost,preferredImplyPlanar);
100 bool preferredImplyPlanar =
false)
102 return doCall(G,preferredEdges,delEdges,
nullptr,preferredImplyPlanar);
114 return doCall(G,preferredEdges,delEdges, &cost);
124 return doCall(G,preferredEdges,delEdges);
132 bool preferredImplyPlanar =
false)
134 return call(G,preferredEdges,delEdges,preferredImplyPlanar);
139 return call(G,delEdges);
153 bool preferredImplyPlanar =
false)
156 ReturnType retValue =
call(GC, preferredEdges, delEdges, preferredImplyPlanar);
158 for (
edge eCopy : delEdges) {
184 #ifndef OGDF_MEMORY_POOL_NTS 210 bool preferredImplyPlanar =
false) = 0;
virtual ~PlanarSubgraphModule()
void maxThreads(unsigned int n)
Sets the maximal number of used threads to n.
unsigned int m_maxThreads
The maximal number of used threads.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Data type for general directed graphs (adjacency list representation).
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
PlanarSubgraphModule()
Initializes a planar subgraph module (default constructor).
Declares base class for all module types.
unsigned int maxThreads() const
Returns the maximal number of used threads.
ReturnType
The return type of a module.
virtual void delEdge(edge e) override
Removes edge e and clears the list of edges corresponding to e's original edge.
class for timeout funtionality.
Interface for planar subgraph algorithms.
Contains logging functionality.
Declaration of graph copy classes.
Declaration of Thread class representing threads.
Class for the representation of edges.
ReturnType callAndDelete(GraphCopy &GC, const List< edge > &preferredEdges, List< edge > &delOrigEdges, bool preferredImplyPlanar=false)
Makes GC planar by deleting edges.
Copies of graphs supporting edge splitting.
const Graph & original() const
Returns a reference to the original graph.
virtual PlanarSubgraphModule * clone() const =0
Returns a new instance of the planar subgraph module with the same option settings.
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.
ReturnType callAndDelete(GraphCopy &GC, List< edge > &delOrigEdges)
Makes G planar by deleting edges.
Declares base class for modules with timeout functionality.
PlanarSubgraphModule(const PlanarSubgraphModule &psm)
Initializes a planar subgraph module (copy constructor).
static bool isSolution(ReturnType ret)
Returns true iff ret indicates that the module returned a feasible solution.
ReturnType call(const Graph &G, List< edge > &delEdges)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
The namespace for all OGDF objects.
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.
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.
ReturnType operator()(const Graph &G, List< edge > &delEdges)
Returns the set of edges delEdges which have to be deleted to obtain the planar subgraph.
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.
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.