* @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_ */
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);
}
xfree(unchosen_row);
xfree(col_mate);
- *final_cost = cost;
+ if (final_cost != NULL)
+ *final_cost = cost;
return 0;
}