net.sf.cpsolver.studentsct
Class OnlineSectProof.CatCmp

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

public static class OnlineSectProof.CatCmp
extends Object
implements Comparator

Comparison of two categories


Constructor Summary
OnlineSectProof.CatCmp(Hashtable countCat, Hashtable totalCat, Hashtable worstCaseCat)
          Constructor
 
Method Summary
 int compare(Object o1, Object o2)
          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(Hashtable countCat,
                              Hashtable totalCat,
                              Hashtable 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(Object o1,
                   Object o2)
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