Internals

GraphsFlows.residualFunction
residual(flow_graph)

Return a directed residual graph for a directed flow_graph.

The residual graph comprises the same node list as the orginal flow graph, but ensures that for each edge (u,v), (v,u) also exists in the graph. This allows flow in the reverse direction.

If only the forward edge exists, a reverse edge is created with capacity 0. If both forward and reverse edges exist, their capacities are left unchanged. Since the capacities in Graphs.DefaultDistance cannot be changed, an array of ones is created.

source
GraphsFlows.is_zeroFunction
is_zero(value; tolerance)

Test if the value is equal to zero. It handles floating point errors.

source