51 template<
typename TCost>
61 return call(graph,
nullptr, s, t, edgeList, e_st);
69 return call(graph, &weight, s, t, edgeList, e_st);
84 template<
typename TCost>
87 bool weighted = (weight !=
nullptr);
97 m_weightedGc.
init(graph);
99 e_st = m_weightedGc.
copy(e_st);
101 s = m_weightedGc.
copy(s);
102 t = m_weightedGc.
copy(t);
105 for(
edge e : edges) {
106 mapE[m_weightedGc.
copy(e)] = e;
107 if(m_weightedGc.
copy(e) == e_st) {
112 for(; i < (*weight)[e]; i++) {
113 edge copyEdge = m_weightedGc.
copy(e);
134 if (e_st !=
nullptr) {
158 bool dir = (eCand->
source() == prev[eCand]);
162 if (spPred[v] ==
nullptr) {
165 direction[eCand] = dir;
175 edge eDual = spPred[v];
183 }
while (v != source);
191 if (prev[adj->
theEdge()] ==
nullptr) {
199 auto prevIt = edgeList.
begin();
200 for(
auto it = prevIt.succ(); it != edgeList.
end(); prevIt = it++) {
202 edgeList.
del(prevIt);
node target() const
Returns the target node of the edge.
void clear()
Removes all elements from the list.
void move(edge e, adjEntry adjSrc, Direction dirSrc, adjEntry adjTgt, Direction dirTgt)
Moves edge e to a different adjacency list.
edge theEdge() const
Returns the edge associated with this adjacency entry.
node copy(node v) const
Returns the node in the graph copy corresponding to v.
Includes declaration of dual graph class.
iterator pushBack(const E &x)
Adds element x at the end of the list.
Data type for general directed graphs (adjacency list representation).
edge searchEdge(node v, node w) const
Searches and returns an edge connecting nodes v and w in time O( min(deg(v ), deg(w )))...
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
iterator append(const E &x)
Adds x at the end of queue.
void init(const Graph &G)
Re-initializes the copy using the graph G.
iterator begin()
Returns an iterator to the first element of the list.
Implementation of list-based queues.
E pop()
Removes front element and returns it.
face rightFace(adjEntry adj) const
Returns the face to the right of adj, i.e., the face containing adj.
void del(iterator it)
Removes it from the list.
edge newEdge(edge eOrig)
Creates a new edge (v,w) with original edge eOrig.
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...
virtual bool direction(edge e)
Returns the direction of e in the cut.
Dynamic arrays indexed with nodes.
Implementation of Dijkstra's single source shortest path algorithm.
Min-st-cut algorithm, that calculates the cut by doing a depth first search over the dual graph of of...
Declaration of graph copy classes.
iterator end()
Returns an iterator to one-past-last element of the list.
Declaration and implementation of list-based queues (classes QueuePure<E> and Queue<E>).
Class for the representation of edges.
void allEdges(EDGELIST &edgeList) const
Returns a list with all edges of the graph.
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.
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.
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
Class for adjacency list elements.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
virtual bool call(const Graph &graph, const EdgeArray< TCost > &weight, node s, node t, List< edge > &edgeList, edge e_st) override
The actual algorithm call.
virtual bool call(const Graph &graph, node s, node t, List< edge > &edgeList, edge e_st) override
The actual algorithm call.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.