|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Sequencers are an important component of Searchers. The function of a Sequencer is to take several WtdObjSets and merge them into a single bag of weighted objects in non-increasing order. The contents of this resulting sequence are the WtdObjs from the component sets in the same order as a WtdObjSet (highest weight to lowest) but with duplicates not removed.
NOTE: Given the intended use of Sequencers, we can implement the result sequence as a succession of objects returned by a nextElement() method. There are two ways to design this. Either a Sequencer should return an Enumeration that provides nextElement() and hasMoreElements() methods, or it can itself *be* an Enumeration. I have chosen the second course here, since most sequencers only run through their sequence a single time (while loading the appropriate Table or Cache). The expection is the "terminal" sequencers in Aquinas and Occam, where many objects may share a single Searcher, each using their own Enumeration to step through a (partially pre-computed) sequence of results. To enable this sharing, we will capture the Sequencer results in a Cache and provide Enumerations to the Cache.
Enumeration,
EnumCacheWtdObjSet,
EnumCacheWtdObjSetEnum| Method Summary | |
int |
expectedNumElts()
Return the expected number of unique elements in the result sequence. |
int |
maxNumElts()
Return the maximum number of unique elements in the result sequence. |
java.lang.String |
profile()
Return a short human-readable string that quickly describes this set. |
java.lang.String |
toString()
Return a human-readable string for this entire set (may be large). |
| Methods inherited from interface java.util.Enumeration |
hasMoreElements,
nextElement |
| Method Detail |
public int expectedNumElts()
NOTE: The statistics here are drawn from the hypergeometric distribution. Follow code and documentation in the C++ file "search/woset_coll.cc."
To make the statistics work, we need to know the size of the
universe: in this case, the class from which the objects in the
sets were drawn. Since this is most likely to be known at
construction time, any constructor for a Sequencer should include
a parameter
long classSize.
public int maxNumElts()
public java.lang.String toString()
public java.lang.String profile()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||