net.sf.cpsolver.studentsct
Class OnlineSectProof.CatCmp
java.lang.Object
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
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 |
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)
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.