Consider using a tolerance threshold instead of strict equality to zero when determining saturated edges for the min-cut. This change would improve robustness in floating point scenarios.
and abs(d[capacity_attr] - d.get(flow_attr, 0.0)) < 1e-9
Originally posted by @Copilot in #77 (comment)