babase.ranker.auto
Class DefaultAutoRanker

java.lang.Object
  extended by babase.ranker.auto.DefaultAutoRanker

public class DefaultAutoRanker
extends java.lang.Object

The DefaultAutoRanker implements the following rule for ordering individuals. See Individual.IndividualClassification for precise definition of enumeration constants below; the classification is computed with respect to the ranking start date. First come the adult males (ADULT_MALE) in reverse age order (youngest to oldest). Then come subadult males (SUBADULT_MALE) in age order (oldest to youngest). Then come adult females (ADULT_FEMALE) in alphabetical order of snames. Then come juvenile males (JUV_MALE) in age order (oldest to youngest). Then come juvenile females (JUV_FEMALE) in age order (oldest to youngest). Finally, any one who do not fall into any of the above classifications (UNKNOWN). Whenever there is a tie, we go by alpabetical order of snames.

Author:
junyang

Field Summary
private static java.util.EnumMap<Individual.IndividualClassification,java.lang.Integer> INDIVIDUAL_CLASSIFICATION_ORDER
           
 
Constructor Summary
DefaultAutoRanker()
           
 
Method Summary
static int[] rank(Cage cage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDIVIDUAL_CLASSIFICATION_ORDER

private static final java.util.EnumMap<Individual.IndividualClassification,java.lang.Integer> INDIVIDUAL_CLASSIFICATION_ORDER
Constructor Detail

DefaultAutoRanker

public DefaultAutoRanker()
Method Detail

rank

public static int[] rank(Cage cage)