|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
55 template<
typename TCost>
76 if (G.numberOfEdges() < 9) {
102 for (
edge e : G.edges) {
104 blockEdges[componentID[e]].pushFront(e);
111 for (i = 0; i < bcCount; i++) {
112 for (
edge e : blockEdges[i]) {
114 blockNodes[i].pushBack(e->
source());
118 blockNodes[i].pushBack(e->
target());
122 for (
node v : blockNodes[i]) {
133 for (i = 0; i < bcCount; i++) {
136 for (
node v : blockNodes[i]) {
143 for (
edge e : blockEdges[i]) {
146 if (pCost !=
nullptr) {
147 cost[tableEdges[e]] = (*pCost)[e];
156 for (
edge e : blockEdges[i]) {
157 backTableEdges[tableEdges[e]] = e;
164 mr = mc.
call(CG, pCost ==
nullptr ?
nullptr : &cost, delEdgesOfBC);
173 while (!delEdgesOfBC.empty()) {
185 template<
typename U = TCost>
188 if (pCost ==
nullptr) {
192 for (
auto it = pCost->begin(); it != pCost->end(); ++it) {
193 dCost[it.key()] = it.value();
202 return mc.
call(CG, pCost, delEdges);
The namespace for all OGDF objects.
Interface for planar subgraph algorithms.
Includes declaration of graph class.
Exact computation of a maximum planar subgraph.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
E popFrontRet()
Removes the first element from the list and returns it.
Declaration of extended graph algorithms.
virtual MaximumPlanarSubgraph * clone() const override
Returns a new instance of the planar subgraph module with the same option settings.
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.
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.
@ Optimal
The solution is optimal.
bool isSelfLoop() const
Returns true iff the edge is a self-loop (source node = target node).
Declaration of interface for planar subgraph algorithms.
Declaration of singly linked lists and iterators.
The parameterized class Array implements dynamic arrays of type E.
Decralation of GraphElement and GraphList classes.
node source() const
Returns the source node of the edge.
Exact computation of a maximum c-planar subgraph.
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
Declaration of an exact c-planar subgraph algorithm, i.e., a maximum c-planar subgraph is computed us...
int biconnectedComponents(const Graph &G, EdgeArray< int > &component, int &nonEmptyComponents)
Computes the biconnected components of G.
Basic declarations, included by all source files.
Module::ReturnType callWithDouble(MaximumCPlanarSubgraph &mc, const Graph &G, const EdgeArray< U > *pCost, List< edge > &delEdges)
node newNode(int index=-1)
Creates a new node and returns it.
Declaration and implementation of Array class and Array algorithms.
virtual ~MaximumPlanarSubgraph()
Class for the representation of edges.
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Declaration of doubly linked lists and iterators.
Declares base class for all module types.
node target() const
Returns the target node of the edge.
ReturnType
The return type of a module.
edge newEdge(node v, node w, int index=-1)
Creates a new edge (v,w) and returns it.
Representation of clustered graphs.
Class for the representation of nodes.
Declaration of simple graph algorithms.
iterator pushBack(const E &x)
Adds element x at the end of the list.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
void clear()
Removes all elements from the list.
Module::ReturnType callWithDouble(MaximumCPlanarSubgraph &mc, const Graph &G, const EdgeArray< double > *pCost, List< edge > &delEdges)