edu.indiana.util.ensemble
Class SuggestionSet

java.lang.Object
  extended by edu.indiana.util.ensemble.SuggestionSet

public class SuggestionSet
extends java.lang.Object

A container for a list of suggestions and the corresponding strength of each suggestion.


Field Summary
protected  java.util.HashMap suggestionToStr
          A mapping from a suggestion Object to its MutableDouble strength value.
 
Constructor Summary
SuggestionSet()
           
SuggestionSet(int initialCapacity)
          Creates a new instance of SuggestionSet
 
Method Summary
 void addSuggestion(java.lang.Object suggestion, double strength)
           
 java.lang.Object calcTopSuggestion()
           
 java.util.Iterator iterator()
          Returns an iterator over Map.Entry objects, from Object to MutableDouble strength of suggestion.
 void mergeWith(SuggestionSet otherSet)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

suggestionToStr

protected java.util.HashMap suggestionToStr
A mapping from a suggestion Object to its MutableDouble strength value.

Constructor Detail

SuggestionSet

public SuggestionSet()

SuggestionSet

public SuggestionSet(int initialCapacity)
Creates a new instance of SuggestionSet

Method Detail

addSuggestion

public void addSuggestion(java.lang.Object suggestion,
                          double strength)

mergeWith

public void mergeWith(SuggestionSet otherSet)

calcTopSuggestion

public java.lang.Object calcTopSuggestion()

iterator

public java.util.Iterator iterator()
Returns an iterator over Map.Entry objects, from Object to MutableDouble strength of suggestion.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object