Package edu.cmu.tetrad.search.utils
Class HungarianAlgorithm
java.lang.Object
edu.cmu.tetrad.search.utils.HungarianAlgorithm
Provides an implemetation of the Kuhn–Munkres assignment algorithm of the year 1957. https://en.wikipedia.org/wiki/Hungarian_algorithm.
From: https://github.com/aalmi/HungarianAlgorithm
This is not our code; please see the references given. We've just made a few tweaks to make it work better in Tetrad. Thanks aalmi.
- Version:
- 1.0
- Author:
- ... | march 2014
-
Constructor Summary
ConstructorsConstructorDescriptionHungarianAlgorithm
(double[][] costMatrix) Trying to find lowest-cost assignment. -
Method Summary
Modifier and TypeMethodDescriptionint[][]
find an optimal assignmentstatic void
main.
-
Constructor Details
-
HungarianAlgorithm
public HungarianAlgorithm(double[][] costMatrix) Trying to find lowest-cost assignment.- Parameters:
costMatrix
- an array of objects
-
-
Method Details
-
main
-
findOptimalAssignment
public int[][] findOptimalAssignment()find an optimal assignment- Returns:
- optimal assignment
-