Skip to content

vivet/HungarianAlgorithm

Repository files navigation

Hungarian Algorithm

Build status NuGet NuGet

The Hungarian algorithm is a combinatorial optimization method, that solves the assignment problem in polynomial time, and which anticipated later primal-dual methods. In other words, based on a matrix of possible combinations of costs, the algorithm returns an ordered collcetion of matches, having the lowest combined cost, thus being the most optimal assignment.


The Algorithm

The example below, shows how to use and apply the algorithm.
It defines a two-dimensional array, passes it to algorithm, and recieves a result of an array of matched columns for each row (x) passed.

int[,] costs = new int[x,y]();
int[] result = HungarianAlgorithm.FindAssignments(costs);

Original source-code posted by Alex Regueiro in 2010 (Link)

About

Hungarian Algorithm Implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages