net.sf.cpsolver.studentsct
Class OnlineSectProof.CatCmp

java.lang.Object
  extended by net.sf.cpsolver.studentsct.OnlineSectProof.CatCmp
All Implemented Interfaces:
Comparator<String>
Enclosing class:
OnlineSectProof

public static class OnlineSectProof.CatCmp
extends Object
implements Comparator<String>

Comparison of two categories


Constructor Summary
OnlineSectProof.CatCmp(HashMap<String,OnlineSectProof.Counter> countCat, HashMap<String,OnlineSectProof.Counter> totalCat, HashMap<String,Integer> worstCaseCat)
          Constructor
 
Method Summary
 int compare(String c1, String c2)
          Higher number of not-sectioned students in the worst case goes first.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

OnlineSectProof.CatCmp

public OnlineSectProof.CatCmp(HashMap<String,OnlineSectProof.Counter> countCat,
                              HashMap<String,OnlineSectProof.Counter> totalCat,
                              HashMap<String,Integer> worstCaseCat)
Constructor

Parameters:
countCat - table (category, number of sequences of that category)
totalCat - table (category, total number of students that were not sectioned of a sequence from this category)
worstCaseCat - (category, worst number of students that were not sectioned of a sequence from this category)
Method Detail

compare

public int compare(String c1,
                   String c2)
Higher number of not-sectioned students in the worst case goes first. If the same, higher average number of not-sectioned students goes first. If the same, compare by category.

Specified by:
compare in interface Comparator<String>


Copyright © 2014 UniTime LLC. All Rights Reserved.