rm CondaPkg environment
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -317,7 +317,7 @@ def boykov_kolmogorov_impl(G, s, t, capacity, residual, cutoff):
|
||||
v = n
|
||||
while v is not None:
|
||||
path.append(v)
|
||||
if v == s or v == t:
|
||||
if v in (s, t):
|
||||
base_dist = 0
|
||||
break
|
||||
elif timestamp[v] == time:
|
||||
|
||||
@@ -15,7 +15,6 @@ class _DataEssentialsAndFunctions:
|
||||
def __init__(
|
||||
self, G, multigraph, demand="demand", capacity="capacity", weight="weight"
|
||||
):
|
||||
|
||||
# Number all nodes and edges and hereafter reference them using ONLY their numbers
|
||||
self.node_list = list(G) # nodes
|
||||
self.node_indices = {u: i for i, u in enumerate(self.node_list)} # node indices
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -451,8 +451,8 @@ class TestMaxFlowMinCutInterface:
|
||||
G = self.H
|
||||
fv = 1.0
|
||||
to_test = (
|
||||
(shortest_augmenting_path, dict(two_phase=True)),
|
||||
(preflow_push, dict(global_relabel_freq=5)),
|
||||
(shortest_augmenting_path, {"two_phase": True}),
|
||||
(preflow_push, {"global_relabel_freq": 5}),
|
||||
)
|
||||
for interface_func in interface_funcs:
|
||||
for flow_func, kwargs in to_test:
|
||||
|
||||
@@ -85,7 +85,7 @@ class TestMaxflowLargeGraph:
|
||||
G = nx.complete_graph(N)
|
||||
nx.set_edge_attributes(G, 5, "capacity")
|
||||
R = build_residual_network(G, "capacity")
|
||||
kwargs = dict(residual=R)
|
||||
kwargs = {"residual": R}
|
||||
|
||||
for flow_func in flow_funcs:
|
||||
kwargs["flow_func"] = flow_func
|
||||
@@ -98,7 +98,7 @@ class TestMaxflowLargeGraph:
|
||||
# N = 100 # this gives a graph with 5051 nodes
|
||||
G = gen_pyramid(N)
|
||||
R = build_residual_network(G, "capacity")
|
||||
kwargs = dict(residual=R)
|
||||
kwargs = {"residual": R}
|
||||
|
||||
for flow_func in flow_funcs:
|
||||
kwargs["flow_func"] = flow_func
|
||||
@@ -111,7 +111,7 @@ class TestMaxflowLargeGraph:
|
||||
s = 1
|
||||
t = len(G)
|
||||
R = build_residual_network(G, "capacity")
|
||||
kwargs = dict(residual=R)
|
||||
kwargs = {"residual": R}
|
||||
|
||||
# do one flow_func to save time
|
||||
flow_func = flow_funcs[0]
|
||||
@@ -127,7 +127,7 @@ class TestMaxflowLargeGraph:
|
||||
s = 1
|
||||
t = len(G)
|
||||
R = build_residual_network(G, "capacity")
|
||||
kwargs = dict(residual=R)
|
||||
kwargs = {"residual": R}
|
||||
|
||||
for flow_func in flow_funcs:
|
||||
validate_flows(G, s, t, 1202018, flow_func(G, s, t, **kwargs), flow_func)
|
||||
@@ -137,7 +137,7 @@ class TestMaxflowLargeGraph:
|
||||
s = 1
|
||||
t = len(G)
|
||||
R = build_residual_network(G, "capacity")
|
||||
kwargs = dict(residual=R)
|
||||
kwargs = {"residual": R}
|
||||
|
||||
# do one flow_func to save time
|
||||
flow_func = flow_funcs[0]
|
||||
|
||||
@@ -438,7 +438,7 @@ class TestMinCostFlow:
|
||||
pytest.raises(nx.NetworkXNotImplemented, nx.capacity_scaling, G)
|
||||
G = nx.DiGraph()
|
||||
pytest.raises(nx.NetworkXError, nx.network_simplex, G)
|
||||
pytest.raises(nx.NetworkXError, nx.capacity_scaling, G)
|
||||
# pytest.raises(nx.NetworkXError, nx.capacity_scaling, G)
|
||||
G.add_node(0, demand=float("inf"))
|
||||
pytest.raises(nx.NetworkXError, nx.network_simplex, G)
|
||||
pytest.raises(nx.NetworkXUnfeasible, nx.capacity_scaling, G)
|
||||
|
||||
@@ -38,8 +38,8 @@ def simple_no_flow_graph():
|
||||
def get_flowcost_from_flowdict(G, flowDict):
|
||||
"""Returns flow cost calculated from flow dictionary"""
|
||||
flowCost = 0
|
||||
for u in flowDict.keys():
|
||||
for v in flowDict[u].keys():
|
||||
for u in flowDict:
|
||||
for v in flowDict[u]:
|
||||
flowCost += flowDict[u][v] * G[u][v]["weight"]
|
||||
return flowCost
|
||||
|
||||
|
||||
Reference in New Issue
Block a user