26 #ifndef __UTILS_HUNGARIAN_METHOD_HUNGARIAN_H_ 27 #define __UTILS_HUNGARIAN_METHOD_HUNGARIAN_H_ 29 #define HUNGARIAN_NOT_ASSIGNED 0 30 #define HUNGARIAN_ASSIGNED 1 32 #define HUNGARIAN_MODE_MINIMIZE_COST 0 33 #define HUNGARIAN_MODE_MAXIMIZE_UTIL 1 46 } hungarian_problem_t;
55 int init(
int** cost_matrix,
56 int rows,
int cols,
int mode);
75 hungarian_problem_t *
p;
int get_column_assignment(const int &col)
Get column assignment.
int get_row_assignment(const int &row)
Get row assignment.
void print_status()
Print the current status.
void print_matrix(int **C, int rows, int cols)
Print matrix to stdout.
~HungarianMethod()
Destructor.
void solve()
Solve the assignment problem.
Fawkes library namespace.
bool is_available()
Check if data is available.
hungarian_problem_t * p
our problem instance member.
Hungarian method assignment solver.
void print_cost_matrix()
Print the cost matrix.
void print_assignment()
Print the assignment matrix.
int init(int **cost_matrix, int rows, int cols, int mode)
Initialize hungarian method.
int * get_assignment(int &size)
Get assignment and size.
void free()
Free space alloacted by method.
HungarianMethod()
Constructor.
int ** array_to_matrix(int *m, int rows, int cols)
Convert an array to a matrix.