public int compare(StateHistoryTracker.WordStats wordStats, StateHistoryTracker.WordStats wordStats2)
 {
     if (StateHistoryTracker.WordStats.access_000(wordStats) > StateHistoryTracker.WordStats.access_000(wordStats2))
     {
         return(-1);
     }
     if (StateHistoryTracker.WordStats.access_000(wordStats) == StateHistoryTracker.WordStats.access_000(wordStats2))
     {
         return(0);
     }
     return(1);
 }
Beispiel #2
0
        public virtual void add(Token t)
        {
            this.stateCount++;
            WordSequence wordSequence = this.getWordSequence(t);

            StateHistoryTracker.WordStats wordStats = (StateHistoryTracker.WordStats) this.statMap.get(wordSequence);
            if (wordStats == null)
            {
                wordStats = new StateHistoryTracker.WordStats(wordSequence);
                this.statMap.put(wordSequence, wordStats);
            }
            wordStats.update(t);
        }
Beispiel #3
0
        public virtual void dump()
        {
            this.dumpSummary();
            ArrayList arrayList = new ArrayList(this.statMap.values());

            Collections.sort(arrayList, StateHistoryTracker.WordStats.COMPARATOR);
            Iterator iterator = arrayList.iterator();

            while (iterator.hasNext())
            {
                StateHistoryTracker.WordStats wordStats = (StateHistoryTracker.WordStats)iterator.next();
                [email protected](new StringBuilder().append("   ").append(wordStats).toString());
            }
        }
Beispiel #4
0
 internal static float access_000(StateHistoryTracker.WordStats wordStats)
 {
     return(wordStats.maxScore);
 }