Table of Contents

Class MinimumCostFlowResult<TVertex, TEdge, TWeight>

Namespace
Graph1x.Algorithms
Assembly
Graph1x.dll

The outcome of a minimum-cost maximum-flow computation: the maximum flow value, the smallest total cost any flow of that value can achieve, and the flow carried by every edge.

public sealed class MinimumCostFlowResult<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 and cost type.

Inheritance
MinimumCostFlowResult<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

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

TotalCost

Gets the total cost of the flow: the sum over all edges of the edge's flow times its cost — the minimum achievable for any flow of FlowValue.

public TWeight TotalCost { get; }

Property Value

TWeight