|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
52 template<
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()) {
100 if (parent[w] ==
nullptr) {
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) {
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
The namespace for all OGDF objects.
Declaration and implementation of ArrayBuffer class.
Interface for planar subgraph algorithms.
bool empty() const
Returns true iff the graph is empty, i.e., contains no nodes.
Includes declaration of graph class.
@ Feasible
The solution is feasible.
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.
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.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
bool empty() const
Returns true if the buffer is empty, false otherwise.
Declaration of extended graph algorithms.
Copies of graphs supporting edge splitting.
E popRet()
Removes the newest element from the buffer and returns it.
Class for adjacency list elements.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
static void copy(const T &from, T &to)
bool isSelfLoop() const
Returns true iff the edge is a self-loop (source node = target node).
int numberOfEdges() const
Returns the number of edges in the graph.
Declaration of interface for planar subgraph algorithms.
int numberOfNodes() const
Returns the number of nodes in the graph.
Decralation of GraphElement and GraphList classes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
virtual PlanarSubgraphTree * clone() const override
Returns a new instance of the planar subgraph module with the same option settings.
void push(E e)
Puts a new element in the buffer.
node source() const
Returns the source node of the edge.
Declaration of graph copy classes.
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
Maximum planar subgraph heuristic that yields a spanning tree.
node twinNode() const
Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
void updateMax(T &max, const T &newValue)
Stores the maximum of max and newValue in max.
Basic declarations, included by all source files.
T makeMinimumSpanningTree(Graph &G, const EdgeArray< T > &weight)
Reduce a graph to its minimum spanning tree (MST) using Kruskal's algorithm.
Class for the representation of edges.
Declaration of doubly linked lists and iterators.
int size() const
Returns the number of elements in the list.
Declares base class for all module types.
node target() const
Returns the target node of the edge.
ReturnType
The return type of a module.
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.