|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
54 template<
typename TCost>
69 edge e_st =
nullptr)
override {
71 return call(graph, weight, s, t, edgeList, e_st);
77 template<
typename TCost>
89 if (e_st !=
nullptr) {
90 e_st = m_gc->copy(e_st);
92 e_st = m_gc->searchEdge(m_gc->copy(s), m_gc->copy(t));
100 TCost sumOfWeights(0);
101 for (
edge e : m_gc->edges) {
103 weightDual[dual.
dualEdge(e)] = weight[m_gc->original(e)];
104 sumOfWeights += weightDual[dual.
dualEdge(e)];
108 weightDual[dual.
dualEdge(e_st)] = sumOfWeights + 1;
114 D.
call(dual, weightDual, sourceNodeList, prevEdge, distance);
118 edge eDual = prevEdge[v];
122 edgeList.
pushBack(m_gc->original(eG));
125 }
while (v != source);
The namespace for all OGDF objects.
Includes declaration of graph class.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
A dual graph including its combinatorial embedding of an embedded graph.
bool preprocessingDual(const Graph &graph, GraphCopy &gc, CombinatorialEmbedding &CE, node source, node target, edge e_st)
This method preprocesses gc for minstcut calculations, by adding an st-edge if needed and embedding g...
face leftFace(adjEntry adj) const
Returns the face to the left of adj, i.e., the face containing the twin of adj.
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
Copies of graphs supporting edge splitting.
virtual bool call(const Graph &graph, const EdgeArray< TCost > &weight, node s, node t, List< edge > &edgeList, edge e_st=nullptr) override
The actual algorithm call.
Dijkstra's single source shortest path algorithm.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
void call(const Graph &G, const EdgeArray< T > &weight, const List< node > &sources, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false, bool arcsReversed=false, node target=nullptr, T maxLength=std::numeric_limits< T >::max())
Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths a...
Includes declaration of dual graph class.
node source() const
Returns the source node of the edge.
Declaration of graph copy classes.
RegisteredArray for nodes, edges and adjEntries of a graph.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
Data type for general directed graphs (adjacency list representation).
Min-st-cut algorithm, that calculates the cut by calculating the shortest path between the faces adja...
const edge & dualEdge(edge e) const
Returns the edge in the dual graph corresponding to e.
Basic declarations, included by all source files.
Declaration of CombinatorialEmbedding and face.
const edge & primalEdge(edge e) const
Returns the edge in the primal graph corresponding to e.
Combinatorial embeddings of planar graphs with modification functionality.
Class for the representation of edges.
Implementation of Dijkstra's single source shortest path algorithm.
Declaration of doubly linked lists and iterators.
node target() const
Returns the target node of the edge.
const node & dualNode(face f) const
Returns the node in the dual graph corresponding to f.
Template of base class of min-st-cut algorithms.
Class for the representation of nodes.
virtual bool call(const Graph &graph, node s, node t, List< edge > &edgeList, edge e_st=nullptr) override
The actual algorithm call.
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.