@@ -8,7 +8,7 @@
#define COST(column, row) cost[(column) + column_count * (row)]
-static void columns_reduction(int column_count, int row_count,
+static void columns_reduction(size_t column_count, size_t row_count,
int *cost,
int *column2row, int *row2column,
int *v)
@@ -35,7 +35,7 @@ static void columns_reduction(int column_count, int row_count,
}
}
-static void reduction_transfer(int column_count, int row_count,
+static void reduction_transfer(size_t column_count, size_t row_count,
int *cost,
int *free_row, int *free_count,
int *column2row, int *row2column,
@@ -60,7 +60,7 @@ static void reduction_transfer(int column_count, int row_count,
}
}
-static void augmenting_row_reduction(int column_count,
+static void augmenting_row_reduction(size_t column_count,
int *cost,
int *column2row, int *row2column,
int *free_row, int *free_count, int *saved_free_count,
@@ -123,7 +123,7 @@ static void augmenting_row_reduction(int column_count,
}
}
-static void augmentation(int column_count,
+static void augmentation(size_t column_count,
int *cost,
int *column2row, int *row2column,
int *free_row, int free_count,
@@ -218,7 +218,7 @@ static void augmentation(int column_count,
* The parameter `cost` is the cost matrix: the cost to assign column j to row
* i is `cost[j + column_count * i].
*/
-void compute_assignment(int column_count, int row_count,
+void compute_assignment(size_t column_count, size_t row_count,
int *cost,
int *column2row, int *row2column)
{
@@ -13,7 +13,7 @@
* assignments (-1 for unassigned, which can happen only if column_count !=
* row_count).
*/
-void compute_assignment(int column_count, int row_count,
+void compute_assignment(size_t column_count, size_t row_count,
int *cost,
int *column2row, int *row2column);
Future-proof and clarify the compute_assignment() interface by having it take a "size_t" for the count of its that it's processing. For the content itself we need to be able to store a "-1", but there's no reason we can't use a "size_t" for the size of the number of "int"'s we've got. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- linear-assignment.c | 10 +++++----- linear-assignment.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)