32 #ifndef FIRM_ADT_HUNGARIAN_H 33 #define FIRM_ADT_HUNGARIAN_H 79 unsigned right,
unsigned cost);
110 unsigned *final_cost,
unsigned cost_threshold);
void hungarian_prepare_cost_matrix(hungarian_problem_t *p, hungarian_mode_t mode)
Prepares the cost matrix dependent on the given mode.
void hungarian_free(hungarian_problem_t *p)
Destroys the hungarian object.
matchings of nodes having no edge getting removed
hungarian_problem_t * hungarian_new(unsigned num_rows, unsigned num_cols, match_type_t match_type)
This method initialize the hungarian_problem structure and init the cost matrix (missing lines or col...
void hungarian_add(hungarian_problem_t *p, unsigned left, unsigned right, unsigned cost)
Adds an edge from left to right with some costs.
hungarian_mode_t
mode of matching (the optimization goal)
struct hungarian_problem_t hungarian_problem_t
Internal representation of a bipartite matching problem.
int hungarian_solve(hungarian_problem_t *p, unsigned *assignment, unsigned *final_cost, unsigned cost_threshold)
This method computes the optimal assignment.
match_type_t
type of matching
void hungarian_remove(hungarian_problem_t *p, unsigned left, unsigned right)
Removes the edge from left to right.
ever nodes matches another node
void hungarian_print_cost_matrix(hungarian_problem_t const *p, int cost_width)
Print the cost matrix.