Skip to content

Commit

Permalink
Merge pull request accord-net#2028 from stephengreenfield/patch-1
Browse files Browse the repository at this point in the history
Support Rectangular Matrices
  • Loading branch information
cesarsouza committed May 10, 2020
2 parents d652497 + 95d2011 commit e5296ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Accord.Math/Optimization/Munkres.cs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ private int step_four()
zeros.RemoveAll(x => x.Item1 == path_row_0);

// Update
for (int r = 0; r < rowCover.Length; r++)
for (int r = 0; r < Math.Min(costMatrix.Length, rowCover.Length); r++)
{
if (rowCover[r])
continue;
Expand Down Expand Up @@ -686,4 +686,4 @@ private int step_seven()


}
}
}

0 comments on commit e5296ed

Please sign in to comment.