edu.indiana.util.ensemble
Class SuggestionSet
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
suggestionToStr
protected java.util.HashMap suggestionToStr
- A mapping from a suggestion Object to its MutableDouble strength value.
SuggestionSet
public SuggestionSet()
SuggestionSet
public SuggestionSet(int initialCapacity)
- Creates a new instance of SuggestionSet
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