|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.search.MergeSequencer
A MergeSequencer is a Sequencer designed to work on a few component sets. Since the number of sets is small, we can perform a linear search for the set with the next highest element more efficiently than any fancier search.
We expect the weights in any WtdObjSet to drop off, not smoothly, but as a stairstep function. Thus instead of searching for the top element among the (scaled) component sets, we begin be searching for the top two sets, and search only when the top weight in the second set exceeds that in the top set.
Sequencer,
Enumeration| Constructor Summary | |
MergeSequencer(int ExpectedNumSets,
long classSize,
edu.vt.marian.common.Debug d)
Create a merging sequencer for an expected number of sets. |
|
MergeSequencer(long classSize,
edu.vt.marian.common.Debug d)
Create a merging sequencer for an unknown number of sets. |
|
| Method Summary | |
int |
addSet(WtdObjSet set)
Add a new component set to the Sequencer with no scaling constant. |
int |
expectedNumElts()
Return the expected number of unique elements in the result sequence. |
boolean |
hasMoreElements()
|
int |
maxNumElts()
Return the maximum number of unique elements in the result sequence. |
java.lang.Object |
nextElement()
|
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 class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public MergeSequencer(long classSize,
edu.vt.marian.common.Debug d)
public MergeSequencer(int ExpectedNumSets,
long classSize,
edu.vt.marian.common.Debug d)
expectedNumSets - As many sets as we expect to add. Does not
need to be perfectly accurate.| Method Detail |
public int addSet(WtdObjSet set)
set - a component weighted object set.public int expectedNumElts()
public int maxNumElts()
public java.lang.Object nextElement()
public boolean hasMoreElements()
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 | |||||||