|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
55 template<
typename TCap>
62 edge e_new_dg = gr.
newEdge(e->target(), e->source());
63 new_costs[e_new_dg] = 0;
99 for (
edge e : (*this->
m_G).edges) {
103 costs[dg.
dualEdge(ts_edge)] = std::numeric_limits<TCap>::max();
108 dij.
call(dg, costs, dg.
dualNode(f_infty), preds, dists,
true);
110 for (
edge e : (*this->
m_G).edges) {
120 flowValue += (*this->
m_flow)[e];
122 flowValue -= (*this->
m_flow)[e];
The namespace for all OGDF objects.
Includes declaration of graph class.
bool isFeasibleInstance() const
Return whether the instance is feasible, i.e. the capacities are non-negative.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Interface for Max Flow Algorithms.
adjEntry findCommonFace(const node v, const node w, bool left=true) const
Identifies a common face of two nodes and returns the respective adjacency entry.
const node * m_t
Pointer to the sink node.
A dual graph including its combinatorial embedding of an embedded graph.
void createBackArcs(Graph &gr, EdgeArray< TCap > &new_costs)
Create back arcs for all edges and set the backedges' new_costs to zero.
face leftFace(adjEntry adj) const
Returns the face to the left of adj, i.e., the face containing the twin of adj.
Declaration of extended graph algorithms.
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.
bool isPlanar(const Graph &G)
Returns true, if G is planar, false otherwise.
bool isConnected(const Graph &G)
Returns true iff G is connected.
void init(const Graph &graph, EdgeArray< TCap > *flow=nullptr) override
Initialize the problem with a graph and optional flow array. If no flow array is given,...
edge splitFace(adjEntry adjSrc, adjEntry adjTgt, bool sourceAfter=false)
Splits a face by inserting a new edge.
Class for adjacency list elements.
void setExternalFace(face f)
Sets the external face to f.
Dijkstra's single source shortest path algorithm.
edge theEdge() const
Returns the edge associated with this adjacency entry.
const node * m_s
Pointer to the source node.
const Graph * m_G
Pointer to the given graph.
Decralation of GraphElement and GraphList classes.
internal::GraphObjectContainer< AdjElement > adjEntries
The container containing all entries in the adjacency list of this node.
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.
edge pred() const
Returns the predecessor in the list of all edges.
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).
edge lastEdge() const
Returns the last edge in the list of all edges.
edge copy(edge e) const override
Returns the first edge in the list of edges corresponding to edge e.
virtual void init(const Graph &graph, EdgeArray< T > *flow=nullptr)
Initialize the problem with a graph and optional flow array. If no flow array is given,...
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.
Combinatorial embeddings of planar graphs with modification functionality.
TCap computeValue(const EdgeArray< TCap > &cap, const node &s, const node &t) override
Compute only the value of the flow.
void computeFlowAfterValue() override
Implementation of computeFlowAfterValue from the super class. This does nothing, because the algorith...
Class for the representation of edges.
Implementation of Dijkstra's single source shortest path algorithm.
const EdgeArray< TCap > * m_cap
Pointer to the given capacity array.
Computes a max flow in s-t-planar network via dual shortest paths.
edge newEdge(node v, node w, int index=-1)
Creates a new edge (v,w) and returns it.
const node & dualNode(face f) const
Returns the node in the dual graph corresponding to f.
Class for the representation of nodes.
bool isSTPlanar(const Graph &graph, const node s, const node t)
Returns whether G is s-t-planar (i.e.
Declaration of simple graph algorithms.
EdgeArray< TCap > * m_flow
Pointer to (extern) flow array.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Faces in a combinatorial embedding.