52template<
typename TCost>
65 TCost maxCost = std::numeric_limits<TCost>::min();
72 weight[e] = maxCost - (*pCost)[copy.
original(e)];
78 if (copy.
copy(e) ==
nullptr) {
82 }
else if (!graph.
empty()) {
90 if (parent[v] ==
nullptr) {
94 while (!nodes.
empty()) {
98 node w = adj->twinNode();
100 if (parent[w] ==
nullptr) {
110 node v = e->source();
111 node w = e->target();
113 bool vIsParent = v == parent[w];
114 bool wIsParent = w == parent[v];
118 if (e->isSelfLoop() || (!vIsParent && !wIsParent)) {
120 }
else if (vIsParent) {
122 }
else if (wIsParent) {
Declaration and implementation of ArrayBuffer class.
Includes declaration of graph class.
Declaration of graph copy classes.
Decralation of GraphElement and GraphList classes.
Declaration of doubly linked lists and iterators.
Declares base class for all module types.
Declaration of interface for planar subgraph algorithms.
Basic declarations, included by all source files.
Class for adjacency list elements.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
E popRet()
Removes the newest element from the buffer and returns it.
void push(E e)
Puts a new element in the buffer.
bool empty() const
Returns true if the buffer is empty, false otherwise.
Class for the representation of edges.
const Graph & original() const
Returns a reference to the original graph.
Copies of graphs supporting edge splitting.
edge copy(edge e) const override
Returns the first edge in the list of edges corresponding to edge e.
Data type for general directed graphs (adjacency list representation).
int numberOfNodes() const
Returns the number of nodes in the graph.
int numberOfEdges() const
Returns the number of edges in the graph.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
bool empty() const
Returns true iff the graph is empty, i.e., contains no nodes.
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Doubly linked lists (maintaining the length of the list).
int size() const
Returns the number of elements in the list.
void clear()
Removes all elements from the list.
iterator pushBack(const E &x)
Adds element x at the end of the list.
ReturnType
The return type of a module.
@ Feasible
The solution is feasible.
Class for the representation of nodes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
Interface for planar subgraph algorithms.
Maximum planar subgraph heuristic that yields a spanning tree.
virtual PlanarSubgraphTree * clone() const override
Returns a new instance of the planar subgraph module with the same option settings.
virtual Module::ReturnType doCall(const Graph &graph, const List< edge > &preferredEdges, List< edge > &delEdges, const EdgeArray< TCost > *pCost, bool preferedImplyPlanar) override
Computes the set of edges delEdges which have to be deleted to obtain the planar subgraph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
RegisteredArray for nodes, edges and adjEntries of a graph.
Declaration of extended graph algorithms.
int connectedComponents(const Graph &G, NodeArray< int > &component, List< node > *isolated=nullptr, ArrayBuffer< node > *reprs=nullptr)
Computes the connected components of G and optionally generates a list of isolated nodes.
T makeMinimumSpanningTree(Graph &G, const EdgeArray< T > &weight)
Reduce a graph to its minimum spanning tree (MST) using Kruskal's algorithm.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void updateMax(T &max, const T &newValue)
Stores the maximum of max and newValue in max.
The namespace for all OGDF objects.
Declaration of simple graph algorithms.