49 template<
typename TCost>
65 return call(graph, weight, s, t, edgeList, e_st);
71 template<
typename TCost>
83 if (e_st !=
nullptr) {
94 TCost sumOfWeights(0);
98 sumOfWeights += weightDual[dual.
dualEdge(e)];
102 weightDual[dual.
dualEdge(e_st)] = sumOfWeights + 1;
108 D.
call(dual, weightDual, sourceNodeList, prevEdge, distance);
112 edge eDual = prevEdge[v];
119 }
while (v != source);
node target() const
Returns the target node of the edge.
void clear()
Removes all elements from the list.
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.
Min-st-cut algorithm, that calculates the cut by calculating the shortest path between the faces adja...
node copy(node v) const
Returns the node in the graph copy corresponding to v.
Includes declaration of dual graph class.
Dijkstra's single source shortest path algorithm.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Data type for general directed graphs (adjacency list representation).
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
void call(const Graph &G, const EdgeArray< T > &weight, const List< node > &sources, NodeArray< edge > &predecessor, NodeArray< T > &distance, bool directed=false)
Calculates, based on the graph G with corresponding edge costs and source nodes, the shortest paths a...
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
edge searchEdge(node v, node w, bool directed=false) const
Searches and returns an edge connecting nodes v and w in time O( min(deg(v ), deg(w )))...
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...
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
Dynamic arrays indexed with nodes.
Implementation of Dijkstra's single source shortest path algorithm.
iterator pushFront(const E &x)
Adds element x at the beginning of the list.
Declaration of graph copy classes.
virtual bool call(const Graph &graph, node s, node t, List< edge > &edgeList, edge e_st=nullptr) override
The actual algorithm call.
Class for the representation of edges.
Copies of graphs supporting edge splitting.
Class for the representation of nodes.
const edge & primalEdge(edge e) const
Returns the edge in the primal graph corresponding to e.
const Graph & original() const
Returns a reference to the original graph.
const node & dualNode(face f) const
Returns the node in the dual graph corresponding to f.
A dual graph including its combinatorial embedding of an embedded graph.
const edge & dualEdge(edge e) const
Returns the edge in the dual graph corresponding to e.
face leftFace(adjEntry adj) const
Returns the face to the left of adj, i.e., the face containing the twin of adj.
node source() const
Returns the source node of the edge.
The namespace for all OGDF objects.
Declaration of extended graph algorithms.
Template of base class of min-st-cut algorithms.
Combinatorial embeddings of planar graphs with modification functionality.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.