Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Private Types
icl::cv::HungarianAlgorithm< real > Class Template Reference

Implementation of the Hungarian Algorithm to solve Linear Assignment problems. More...

#include <HungarianAlgorithm.h>

List of all members.

Static Public Member Functions

static std::vector< int > apply (const utils::Array2D< real > &m, bool isCostMatrix=true)
 calculate best assignment given cost matrix m
static void visualizeAssignment (const utils::Array2D< real > &cost, const std::vector< int > &assignment)
 visualized the assignment with given cost matrix and assignment vector

Private Types

typedef utils::Array2D< real > mat
 Internal used cost matrix type.

Detailed Description

template<class real>
class icl::cv::HungarianAlgorithm< real >

Implementation of the Hungarian Algorithm to solve Linear Assignment problems.

See also:
PositionTracker

Assignment Problems (LAP)

A LAP is defined as follows: You have $N$ workers $w_i$ and $N$ tasks $t_j$. Assigning a certain worker $w_i$ to a certain task $t_j$ produces costs $d_{ij}$ which are defined by a square cost matrix $D=\{d_{ij}\}$. 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.

Benchmarks


Member Typedef Documentation

template<class real >
typedef utils::Array2D<real> icl::cv::HungarianAlgorithm< real >::mat [private]

Internal used cost matrix type.


Member Function Documentation

template<class real >
static std::vector<int> icl::cv::HungarianAlgorithm< real >::apply ( const utils::Array2D< real > &  m,
bool  isCostMatrix = true 
) [static]

calculate best assignment given cost matrix m

if isCostMatrix is false, its elements are internally multiplied by -1

template<class real >
static void icl::cv::HungarianAlgorithm< real >::visualizeAssignment ( const utils::Array2D< real > &  cost,
const std::vector< int > &  assignment 
) [static]

visualized the assignment with given cost matrix and assignment vector


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines