Back
satisfies-mass-balance? (clj)
(source)function
(satisfies-mass-balance? flow source sink)
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. The source should have positive net outflow, the
sink negative, and together they should balance.