Commit 52a79f9e authored by Benoit GAUZERE's avatar Benoit GAUZERE

Temporary hack to manage infinite values in cost matrix (infinite is 1000)

parent d6abcc24
......@@ -8,7 +8,7 @@ def computeBipartiteCostMatrix(G1, G2, cf=ConstantCostFunction(1, 3, 1, 3)):
n = G1.number_of_nodes()
m = G2.number_of_nodes()
nm = n + m
C = np.ones([nm, nm])*np.inf
C = np.ones([nm, nm])*1000 #np.inf
C[n:, m:] = 0
for u in G1.nodes():
......
......@@ -42,7 +42,7 @@ class RiesenCostFunction():
""" u et v sont des id de noeuds """
n = len(G1[u])
m = len(G2[v])
sub_C = np.ones([n+m, n+m]) * np.inf
sub_C = np.ones([n+m, n+m]) * 1000 #np.inf
sub_C[n:, m:] = 0
i = 0
l_nbr_u = G1[u]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment