/**
* @file
* @brief Solving the Minimum Assignment Problem using the Hungarian Method.
- * @version $Id$
*/
#ifndef FIRM_ADT_HUNGARIAN_H
#define FIRM_ADT_HUNGARIAN_H
#include "../begin.h"
+/**
+ * @ingroup algorithms
+ * @defgroup hungarian Hungarian Algorithm
+ * Solves bipartite matching problems (minimize/maximize cost function)
+ * @{
+ */
+
+/** type of matching */
typedef enum match_type_t {
HUNGARIAN_MATCH_NORMAL, /**< ever nodes matches another node */
HUNGARIAN_MATCH_PERFECT /**< matchings of nodes having no edge getting
removed */
} match_type_t;
+/** mode of matching (the optimization goal) */
typedef enum hungarian_mode_t {
- HUNGARIAN_MODE_MINIMIZE_COST,
- HUNGARIAN_MODE_MAXIMIZE_UTIL
+ HUNGARIAN_MODE_MINIMIZE_COST, /**< minimize cost */
+ HUNGARIAN_MODE_MAXIMIZE_UTIL /**< maximize cost */
} hungarian_mode_t;
+/**
+ * Internal representation of a bipartite matching problem
+ */
typedef struct hungarian_problem_t hungarian_problem_t;
/**
* Prepares the cost matrix dependent on the given mode.
*
* @param p The hungarian object
- * @param mode specify wether to minimize or maximize the costs
+ * @param mode specify whether to minimize or maximize the costs
*/
FIRM_API void hungarian_prepare_cost_matrix(hungarian_problem_t *p,
hungarian_mode_t mode);
FIRM_API void hungarian_print_cost_matrix(hungarian_problem_t *p,
int cost_width);
+/** @} */
+
#include "../end.h"
#endif