networkx/networkx — pull request #1115 by ysitu (2014-04-20 19:10:55+00:00)
Title: Fix bug that capacity_scaling does not saturate negative selfloops

A test is added to cover the case.

Also included is some changes to the heap interface and `BinaryHeap` implementation that gives ~1.2x speedup to `capacity_scaling`. This invalidates the previous random test cases, so new, more sensible ones are substituted.