Internals
GraphsFlows.DefaultCapacity
— TypeDefaultCapacity{T}
Structure that returns 1
if a forward edge exists in flow_graph
, and 0
otherwise.
GraphsFlows.AbstractFlowAlgorithm
— TypeAbstractFlowAlgorithm
Abstract type that allows users to pass in their preferred algorithm
GraphsFlows.residual
— Functionresidual(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.
GraphsFlows.is_zero
— Functionis_zero(value; tolerance)
Test if the value is equal to zero. It handles floating point errors.