32 #ifndef FIRM_ADT_HUNGARIAN_H
33 #define FIRM_ADT_HUNGARIAN_H
79 unsigned right,
unsigned cost);
110 unsigned *final_cost,
unsigned cost_threshold);
match_type_t
type of matching
void hungarian_free(hungarian_problem_t *p)
Destroys the hungarian object.
void hungarian_print_cost_matrix(hungarian_problem_t const *p, int cost_width)
Print the cost matrix.
hungarian_mode_t
mode of matching (the optimization goal)
struct hungarian_problem_t hungarian_problem_t
Internal representation of a bipartite matching problem.
matchings of nodes having no edge getting removed
void hungarian_prepare_cost_matrix(hungarian_problem_t *p, hungarian_mode_t mode)
Prepares the cost matrix dependent on the given mode.
void hungarian_remove(hungarian_problem_t *p, unsigned left, unsigned right)
Removes the edge from left to right.
void hungarian_add(hungarian_problem_t *p, unsigned left, unsigned right, unsigned cost)
Adds an edge from left to right with some costs.
int hungarian_solve(hungarian_problem_t *p, unsigned *assignment, unsigned *final_cost, unsigned cost_threshold)
This method computes the optimal assignment.
ever nodes matches another node
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...