Image Component Library (ICL)
|
Implementation of the Hungarian Algorithm to solve Linear Assignment problems. More...
#include <HungarianAlgorithm.h>
Static Public Member Functions | |
static std::vector< int > | apply (const utils::Array2D< real > &m, bool isCostMatrix=true) |
calculate best assignment given cost matrix m More... | |
static void | visualizeAssignment (const utils::Array2D< real > &cost, const std::vector< int > &assignment) |
visualized the assignment with given cost matrix and assignment vector More... | |
Private Types | |
typedef utils::Array2D< real > | mat |
Internal used cost matrix type. More... | |
Implementation of the Hungarian Algorithm to solve Linear Assignment problems.
A LAP is defined as follows: You have workers and tasks . Assigning a certain worker to a certain task produces costs which are defined by a square cost matrix . Each worker can only be assigned to perform a single task, and each task has to be processed. The problem is to find the optimal assignment to minimize the arising costs.
|
private |
Internal used cost matrix type.
|
static |
calculate best assignment given cost matrix m
if isCostMatrix is false, its elements are internally multiplied by -1
|
static |
visualized the assignment with given cost matrix and assignment vector