|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
51 template<
typename TCap>
73 OGDF_ASSERT(priority < std::numeric_limits<TCap>::max());
74 return priority + TCap(1);
125 const node& target) {
135 this->
m_cap = &originalCapacities;
150 m_visited.
init(*this->
m_G,
false);
151 m_edgeCounter.
init(*this->
m_G, 0);
160 edge lastSaturated =
nullptr;
166 (*this->
m_flow)[lastSaturated] = (*this->
m_cap)[lastSaturated];
208 if (saturatedEdge ==
nullptr) {
214 v = saturatedEdge->
source();
222 edge e = adj->theEdge();
242 while (
m_pred[w] !=
nullptr) {
258 while (e->
source() != w) {
259 formerSource = e->
source();
263 e =
m_pred[formerSource]->adjSource()->theEdge();
274 if (v == *this->
m_s) {
345 if (v == e->
target() || w == *this->m_s) {
347 }
else if (
m_pred[v] ==
nullptr ||
m_pred[w] ==
nullptr) {
349 }
else if (
m_pred[w]->source() == *this->
m_s) {
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.
Priority queue interface wrapping various heaps.
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.
PrioritizedMapQueue< edge, TCap > * m_prioritizedEdges
A priority queue for storing all edges currently in a path.
const node * m_t
Pointer to the sink node.
NodeArray< edge > m_pred
The predecessor of each node in the currently uppermost path.
Computes a max flow in s-t-planar network via uppermost paths.
~MaxFlowSTPlanarItaiShiloach()
Free allocated ressources.
NodeArray< int > m_edgeCounter
The number of edges visited from each node.
NodeArray< NodeType > m_status
The status of each node.
Class for adjacency list elements.
TCap unshiftedTopPriority()
see unshiftedPriority
const node * m_s
Pointer to the source node.
bool isSelfLoop() const
Returns true iff the edge is a self-loop (source node = target node).
int degree() const
Returns the degree of the node (indegree + outdegree).
const Graph * m_G
Pointer to the given graph.
void dropEdge(const edge e)
Removes a single edge from the current path.
Prioritized queue interface wrapper for heaps.
EdgeArray< bool > m_visited
Whether each edge has was visited.
TCap unshiftedPriority(edge e)
To work with unsigned, we need a priority shifting of the elements in the priority queue.
node source() const
Returns the source node of the edge.
RegisteredArray for nodes, edges and adjEntries of a graph.
adjEntry adjSource() const
Returns the corresponding adjacancy entry at source node.
bool findUppermostPath(const edge saturatedEdge)
Establishes the next uppermost path.
void computeFlowAfterValue()
Computes the actual flow on each edge.
EdgePathType getPathType(const edge e) const
Performs an alternating backtracking from source and target to determine whether the new node is part...
TCap shiftPriority(TCap priority)
see unshiftedPriority
adjEntry cyclicSucc() const
Returns the cyclic successor in the adjacency list.
Combinatorial embeddings of planar graphs.
adjEntry adjTarget() const
Returns the corresponding adjacancy entry at target node.
Basic declarations, included by all source files.
TCap m_partialFlow
The flow reached thus far (monotonically increasing).
Declaration of CombinatorialEmbedding and face.
NodeType
Each node has a certain type depending on its participation in any path.
TCap computeValue(const EdgeArray< TCap > &originalCapacities, const node &source, const node &target)
Computes the maximal flow from source to sink.
EdgePathType
Each edge may be part of the source or target path.
Class for the representation of edges.
void init(const Graph *base=nullptr)
Reinitializes the array. Associates the array with the matching registry of base.
const EdgeArray< TCap > * m_cap
Pointer to the given capacity array.
node target() const
Returns the target node of the edge.
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.
void appendEdge(const edge e)
Appends an edge to the current path.
EdgeArray< TCap > * m_flow
Pointer to (extern) flow array.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
void consistencyCheck() const
Asserts that this embedding is consistent.