pub fn min_weight_full_bipartite_matching(
n_rows: usize,
n_cols: usize,
edges: &[(usize, usize, f64)],
maximize: bool,
) -> Result<(Vec<usize>, Vec<usize>), ErrorsJSL>Expand description
A minimum-weight (or, with maximize, maximum-weight) matching that matches every vertex on
the smaller side (SciPy’s min_weight_full_bipartite_matching). Returns (rows, cols) of the
matched pairs, sorted by row. Successive shortest augmenting paths: each row in turn is
matched by Dijkstra’s algorithm on the reduced costs w(r, c) − u(r) − v(c) ≥ 0, which the
dual potentials u, v keep non-negative; O(V E log V). Errors if no full matching exists.