Commit 7fbd7a18 authored by Matthias Braun's avatar Matthias Braun
Browse files

allow final_cost pointer to be NULL

parent c20b5f64
......@@ -92,6 +92,6 @@ int hungarian_solve(hungarian_problem_t *p, int *assignment, int *final_cost, in
* @param p The hungarian object
* @param cost_width The minimum field width of the costs
void hungarian_print_costmatrix(hungarian_problem_t *p, int cost_width);
void hungarian_print_cost_matrix(hungarian_problem_t *p, int cost_width);
#endif /* _HUNGARIAN_H_ */
......@@ -71,7 +71,7 @@ static void hungarian_dump_f(FILE *f, int **C, int rows, int cols, int width) {
fprintf(f, "\n");
void hungarian_print_costmatrix(hungarian_problem_t *p, int width) {
void hungarian_print_cost_matrix(hungarian_problem_t *p, int width) {
hungarian_dump_f(stderr, p->cost, p->num_rows, p->num_cols, width);
......@@ -441,7 +441,8 @@ done:
*final_cost = cost;
if (final_cost != NULL)
*final_cost = cost;
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment