Closed jackpeters667 closed 2 years ago
Matrix::from_vec()
expects a flat vector, in your case that would be [2; 9]
. In your case, you probably want to use Matrix::from_rows()
which takes something that can be made into an iterator:
let d2: Vec<Vec<i32>> = vec![vec![2;3];3];
let matrix = Matrix::from_rows(d2).unwrap();
let res = kuhn_munkres(&matrix);
Hi there, I'm playing around with the crate and I havent been able to get the munkres algorithm working, I suspect i'm missing something fundamentally. Please have a look
But i'm getting trait bound errors on passing
matrix
to the function. How should I be going about it?