endrov.util.graphs
Class MunkresKuhn

java.lang.Object
  extended by endrov.util.graphs.MunkresKuhn

public class MunkresKuhn
extends java.lang.Object

An implementation of the classic hungarian algorithm for the assignment problem. Copyright 2007 Gary Baker (GPL v3)


Constructor Summary
MunkresKuhn()
           
 
Method Summary
static int[][] computeAssignments(float[][] matrix)
          Invoke algorithm.
static float[][] copyOfMatrix(float[][] costMatrix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MunkresKuhn

public MunkresKuhn()
Method Detail

copyOfMatrix

public static float[][] copyOfMatrix(float[][] costMatrix)

computeAssignments

public static int[][] computeAssignments(float[][] matrix)
Invoke algorithm. Input matrix is modified

Returns:
list of pairs, from-to