edu.vt.marian.search
Class FlatSetSequencer
java.lang.Object
|
+--edu.vt.marian.search.FlatSetSequencer
- public class FlatSetSequencer
- extends java.lang.Object
- implements WtdObjSetSequencer
The sort of Sequencer that is used with large numbers of unweighted
links. The keySet is a set of nodes on one side of links in the class,
and map is either LinkClassManager.sinkToSource() or sourceToSinks().
- See Also:
Sequencer,
WtdObjSetSequencer,
Enumeration
|
Constructor Summary |
FlatSetSequencer(int ExpectedNumSets,
long classSize,
edu.vt.marian.common.Debug d)
Create a merging sequencer for an expected number of sets. |
FlatSetSequencer(long classSize,
edu.vt.marian.common.Debug d)
Create a merging sequencer for an unknown number of sets. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
FlatSetSequencer
public FlatSetSequencer(long classSize,
edu.vt.marian.common.Debug d)
- Create a merging sequencer for an unknown number of sets.
FlatSetSequencer
public FlatSetSequencer(int ExpectedNumSets,
long classSize,
edu.vt.marian.common.Debug d)
- Create a merging sequencer for an expected number of sets.
- Parameters:
expectedNumSets - As many sets as we expect to add. Does not
need to be perfectly accurate.
addSets
public int addSets(WtdObjSet keySet,
WtdObjToSetMapping map)
- Add a new component set to the Sequencer with no scaling constant.
- Specified by:
- addSets in interface WtdObjSetSequencer
- Parameters:
keySet - a weighted object set, each of .map - someone who can turn each FullID in keySet
into a WtdObjSet.- Returns:
- ReturnValues.OK -- set was added without problems.
anything else -- problems.
expectedNumElts
public int expectedNumElts()
- Return the expected number of unique elements in the result
sequence.
NOTE: This must necessarily be very approximate,
since we don't know even the raw sizes of most of the sets
that will be developed from the keySet elements.
maxNumElts
public int maxNumElts()
- Return the maximum number of unique elements in the result
sequence. (This may get expensive.)
nextElement
public java.lang.Object nextElement()
hasMoreElements
public boolean hasMoreElements()
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
profile
public java.lang.String profile()