Package de.timefinder.algo.roomassignment

Examples of de.timefinder.algo.roomassignment.HungarianAlgorithm


    for (int i = 0; i < a.size(); i++) {
      for (int j = 0; j < b.size(); j++) {
        distances[i][j] = distance(a.get(i), b.get(j));
      }
    }
    HungarianAlgorithm ha = new HungarianAlgorithm();
    int[][] assignments = ha.computeAssignments(distances);
    Map<Integer, Integer> result = new HashMap<Integer, Integer>();
    for (int i = 0; i < assignments.length; i++) {
      result.put(assignments[i][0], assignments[i][1]);
    }
    return result;
View Full Code Here

TOP

Related Classes of de.timefinder.algo.roomassignment.HungarianAlgorithm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.