loom.flow

(source)
Algorithms for solving network flow

For more info about this library see:

https://cljdoc.org/d/aysylu/loom/1.0.2/doc/readme
Public Variable Short Description
augment-along-path (clj) Given a flow represented as an adjacency map, returns an updated flow.
bf-find-augmenting-path (clj) Finds a shortest path in the flow network along which there remains residual capacity.
edmonds-karp (clj) Computes the maximum flow on a network, using the edmonds-karp algorithm.
flow-balance (clj) Given a flow, returns a map of {node (sum(in weight) - sum(out weight))}.
is-admissible-flow? (clj) Verifies that a flow satisfies capacity and mass balance constraints.
min-weight-along-path (clj) Given a path, represented by a sequence of nodes, and weight-function, computes the minimum of the edge weights along the path.
residual-capacity (clj) Computes the residual capacity between nodes v1 and v2.
satisfies-capacity-constraints? (clj) Given a flow map, and a capacity function, verifies that the flow on each edge is <= capacity of that edge.
satisfies-mass-balance? (clj) Given a flow, verifies whether at each node the sum of in edge weights is equal to the sum of out edge weights, except at the source and sink.