|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.search.MaxUnionSearcherWtdObjSetEnum
A WtdObjSetEnumeration for a MaxUnionSearcher.
WtdObjSetEnumeration,
MaxUnionSearcher| Field Summary | |
protected edu.vt.marian.common.Debug |
debug
|
protected int |
numSeen
How many elements have we seen already (used to implement *NumRemaining()). |
protected Sequencer |
seq
The LinkSearcher works off a collectoon of sets (weighted or unweighted) each linked to a node in a "key" set. |
protected InsertionOrderWtdObjTable |
tbl
The linking sets in Sequencer are merged through this Table. |
protected java.util.Enumeration |
tblEnum
|
protected edu.vt.marian.common.WtdObj |
top
Keep one element cached (if any available). |
| Constructor Summary | |
MaxUnionSearcherWtdObjSetEnum(Sequencer sequencer,
InsertionOrderWtdObjTable table,
edu.vt.marian.common.Debug d)
|
|
| Method Summary | |
int |
approxNumRemaining()
Return approximate number of elements left. |
int |
exactNumRemaining()
Return exact number of elements remaining in the parent set. |
boolean |
hasMoreElements()
|
int |
maxNumRemaining()
Return maximum number of elements left. |
java.lang.Object |
nextElement()
|
int |
sample(int num,
WtdObjBag sampleBag)
Copy a certain number of elements into a bag. |
int |
sampleToWt(edu.vt.marian.common.Weight minWt,
WtdObjBag sampleBag)
Copy into a bag all the members of this set with weights >= some weight. |
void |
skip(int k)
Skip forward a certain number of elements. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected edu.vt.marian.common.Debug debug
protected Sequencer seq
protected InsertionOrderWtdObjTable tbl
protected java.util.Enumeration tblEnum
protected edu.vt.marian.common.WtdObj top
protected int numSeen
| Constructor Detail |
public MaxUnionSearcherWtdObjSetEnum(Sequencer sequencer,
InsertionOrderWtdObjTable table,
edu.vt.marian.common.Debug d)
| Method Detail |
public boolean hasMoreElements()
public java.lang.Object nextElement()
public void skip(int k)
k - How many elements to skip.
public int sample(int num,
WtdObjBag sampleBag)
num - How many elements to copy.sampleBag - The WtdObjBag to add elements to.
public int sampleToWt(edu.vt.marian.common.Weight minWt,
WtdObjBag sampleBag)
minWt - The lowest weight to copy.sampleBag - The WtdObjBag to add elements to.public int exactNumRemaining()
public int approxNumRemaining()
public int maxNumRemaining()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||