MCPcopy Create free account
hub / github.com/microsoft/JARVIS / compute_assignment_matrix

Function compute_assignment_matrix

taskbench/evaluate.py:55–58  ·  view source on GitHub ↗
(graph_1, graph_2)

Source from the content-addressed store, hash-verified

53 return cost_matrix
54
55def compute_assignment_matrix(graph_1, graph_2):
56 cost_matrix = create_cost_matrix(graph_1, graph_2)
57 row_ind, col_ind = linear_sum_assignment(cost_matrix)
58 return row_ind, col_ind, cost_matrix[row_ind, col_ind].sum()
59
60def matching(graph_1, graph_2):
61 indices_1, indices_2, total_cost = compute_assignment_matrix(graph_1, graph_2)

Callers 1

matchingFunction · 0.85

Calls 1

create_cost_matrixFunction · 0.85

Tested by

no test coverage detected