51 template<
typename TCost>
75 bool preferredImplyPlanar)
override 104 blockEdges[componentID[e]].pushFront(e);
110 for (i = 0; i < bcCount; i++)
112 for (
edge e : blockEdges[i])
116 blockNodes[i].pushBack(e->
source());
121 blockNodes[i].pushBack(e->
target());
125 for (
node v : blockNodes[i])
137 for (i = 0; i < bcCount; i++)
141 for (
node v : blockNodes[i])
149 for (
edge e : blockEdges[i])
153 if(pCost !=
nullptr) {
154 cost[tableEdges[e]] = (*pCost)[e];
163 for (
edge e : blockEdges[i])
164 backTableEdges[tableEdges[e]] = e;
170 mr = mc.
call(CG, pCost ==
nullptr ?
nullptr : &cost, delEdgesOfBC);
178 while (!delEdgesOfBC.
empty())
190 template<
typename U = TCost>
192 if (pCost ==
nullptr) {
197 for (
auto it = pCost->
begin(); it != pCost->
end(); ++it) {
198 dCost[it.key()] = it.value();
205 return mc.
call(CG, pCost, delEdges);
node target() const
Returns the target node of the edge.
void clear()
Removes all elements from the list.
iterator begin()
Returns an iterator to the first entry in the edge array.
The parameterized class Array implements dynamic arrays of type E.
Derived class of GraphObserver providing additional functionality to handle clustered graphs...
iterator pushBack(const E &x)
Adds element x at the end of the list.
Data type for general directed graphs (adjacency list representation).
Declares base class for all module types.
iterator end()
Returns an iterator to one-past-last entry in the edge array.
Exact computation of a maximum c-planar subgraph.
ReturnType
The return type of a module.
Declaration of an exact c-planar subgraph algorithm, i.e., a maximum c-planar subgraph is computed us...
Representation of clustered graphs.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
int numberOfEdges() const
Returns the number of edges in the graph.
Dynamic arrays indexed with nodes.
Interface for planar subgraph algorithms.
edge newEdge(node v, node w)
Creates a new edge (v,w) and returns it.
Module::ReturnType callWithDouble(MaximumCPlanarSubgraph &mc, const Graph &G, const EdgeArray< U > *pCost, List< edge > &delEdges)
virtual MaximumPlanarSubgraph * clone() const override
Returns a new instance of the planar subgraph module with the same option settings.
virtual ~MaximumPlanarSubgraph()
bool isPlanar(const Graph &G)
Returns true, if G is planar, false otherwise.
virtual Module::ReturnType doCall(const Graph &G, const List< edge > &preferredEdges, List< edge > &delEdges, const EdgeArray< TCost > *pCost, bool preferredImplyPlanar) override
Computes the set of edges delEdges which have to be deleted to obtain the planar subgraph.
Class for the representation of edges.
E popFrontRet()
Removes the first element from the list and returns it.
Class for the representation of nodes.
ReturnType call(const ClusterGraph &G, List< edge > &delEdges)
Computes set of edges delEdges, which have to be deleted in order to get a c-planar subgraph...
Module::ReturnType callWithDouble(MaximumCPlanarSubgraph &mc, const Graph &G, const EdgeArray< double > *pCost, List< edge > &delEdges)
bool isSelfLoop() const
Returns true iff the edge is a self-loop (source node = target node).
Declaration of simple graph algorithms.
Declares base class for modules with timeout functionality.
node source() const
Returns the source node of the edge.
int biconnectedComponents(const Graph &G, EdgeArray< int > &component, int &nonEmptyComponents)
Computes the biconnected components of G.
The namespace for all OGDF objects.
Declaration of extended graph algorithms.
Declaration of interface for planar subgraph algorithms.
Exact computation of a maximum planar subgraph.
node newNode()
Creates a new node and returns it.
bool empty() const
Returns true iff the list is empty.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.