Table of Contents

Class MaximumFlowResult<TVertex, TEdge, TWeight>

Namespace
Graph1x.Algorithms
Assembly
Graph1x.dll

The outcome of a maximum-flow computation: the flow value, the flow carried by every edge, and a minimum source/sink cut certifying optimality (its capacity equals the flow value).

public sealed class MaximumFlowResult<TVertex, TEdge, TWeight> where TVertex : notnull where TEdge : IEdge<TVertex> where TWeight : INumber<TWeight>

Type Parameters

TVertex

The vertex type.

TEdge

The edge type.

TWeight

The numeric capacity type.

Inheritance
MaximumFlowResult<TVertex, TEdge, TWeight>
Inherited Members

Properties

EdgeFlows

Gets the flow carried by each edge of the network (parallel edges are listed individually). Edges carrying zero flow are included.

public IReadOnlyList<(TEdge Edge, TWeight Flow)> EdgeFlows { get; }

Property Value

IReadOnlyList<(TEdge Edge, TWeight Flow)>

FlowValue

Gets the value of the maximum flow.

public TWeight FlowValue { get; }

Property Value

TWeight

MinCutEdges

Gets the edges of the minimum cut: every edge leaving SourceSideOfMinCut. Their total capacity equals FlowValue.

public IReadOnlyList<TEdge> MinCutEdges { get; }

Property Value

IReadOnlyList<TEdge>

Sink

Gets the vertex the flow drains into.

public TVertex Sink { get; }

Property Value

TVertex

Source

Gets the vertex the flow originates from.

public TVertex Source { get; }

Property Value

TVertex

SourceSideOfMinCut

Gets the source side of a minimum cut: the vertices still reachable from Source in the residual network.

public IReadOnlySet<TVertex> SourceSideOfMinCut { get; }

Property Value

IReadOnlySet<TVertex>