Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Move network_simplex out of mincost.py
Fix source encoding for python3 compatibility
Add Goldberg-Radzik shortest path algorithm
Fix python2.6 compatibility in goldberg_radzik
Fix python2.6 compatibility in goldberg_radzik
Improve efficiency of goldberg_radzik
Add capacity scaling minimum cost flow algorithm
Allow BinaryHeap to handle incomparable keys
Add documentation for capacity_scaling
Fix comment in capacity_scaling
Fix. parse_edgelist documentation

Changes:
- fix mixing result+params
- added missing ``lines`` param
- use same order of params as in signature
Remove shortest path example from capacity_scaling doc
Fix bug that stoer_wagner ignores weight parameter
Merge pull request #1112 from ysitu/stoer_wagner

Fix bug that stoer_wagner ignores weight parameter
Merge pull request #1107 from ysitu/capacity_scaling

Add capacity scaling mincost flow algorithm
Add Edmonds-Karp maxflow algorithm
Refactor flow package.

This refactoring follows from the discussion at #1096 and #1095. It is fully backwards compatible. The main changes are:

1. Rename max_flow and min_cut to maximum_flow and minimum_cut to be consistent with NetworkX naming convention. The short names can still be used (eg nx.max_flow(...)) but are not in the documentation.

2. maximum_flow and minimum_cut accept a new parameter flow_func for the function that will perform the computation. A default_flow_func is set, which is preflow_push_value, based on the benckmarks by @ysitu at #1099.

3. The legacy implementation of ford_fulkerson and firends is separated in its own file and refactored for it to follow the new conventions in the function names, the implementation is the same.

4. Added a new function that return the residual network for each algorithm implementation. Also added docstrings explaining the conventions used in the residual network.

4. Refactored tests. Now it is easy to add a new maximum flow algorithm for testing. They take maybe a bit too long, but now we test all flow related functions.

5. The functions <algo_name>_{value|flow|residual} are not imported to NetworkX base namespace, it is necessary now to explicitly import them from networkx.algorithms.flow, the exception is ford_fulkerson_flow for backwards compatibility.

6. The maximum flow related functions imported in networkx namespace are: maximum_flow, minimum_cut, ford_fulkerson, preflow_push, shortest_augmenting_path. For convenience max_flow and min_cut are also imported. And for backwards compatibility: ford_fulkerson_flow and ford_fulkerson_flow_and_auxiliary.
Reduce constant factor of maxflow algorithms