Skip to content

Commit

Permalink
Make variable declaration style more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
fuglede committed Jul 10, 2019
1 parent 9ae9f51 commit 3c79248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LinearAssignment/Solver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static Assignment Solve(double[,] cost, bool maximize = false, bool skipP
// In our solution, we will assume that nr <= nc. If this isn't the case,
// we transpose the entire matrix and make sure to fix up the results at
// the end of the day.
bool transpose = false;
var transpose = false;
if (nr > nc)
{
var tmp = nc;
Expand Down Expand Up @@ -180,8 +180,8 @@ public static Assignment Solve(double[,] cost, bool maximize = false, bool skipP

if (maximize)
{
for (int i = 0; i < nr; i++) u[i] = -u[i];
for (int j = 0; j < nc; j++) v[j] = -v[j];
for (var i = 0; i < nr; i++) u[i] = -u[i];
for (var j = 0; j < nc; j++) v[j] = -v[j];
}

return transpose ? new Assignment(y, x, v, u) : new Assignment(x, y, u, v);
Expand Down

0 comments on commit 3c79248

Please sign in to comment.