|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.search.VectorWtdObjSet
A Vector-based cache for any WtdObjSet or WtdObjSet-like object.
WtdObjSet,
VectorWtdObjSetEnum| Field Summary | |
protected edu.vt.marian.common.Debug |
debug
|
protected java.util.Vector |
v
|
| Constructor Summary | |
VectorWtdObjSet(edu.vt.marian.common.Debug d)
|
|
VectorWtdObjSet(int expectedSize,
edu.vt.marian.common.Debug d)
|
|
| Method Summary | |
int |
add(edu.vt.marian.common.WtdObj w)
|
int |
approxSize()
Return the approximate number of elements in this set (can be cheap and dirty). |
WtdObjSetEnumeration |
elements()
Create an Enumeration for this set. |
int |
exactSize()
Return the exact number of elements in this set (may be costly). |
edu.vt.marian.common.Weight |
isElt(edu.vt.marian.common.FullID id)
Is a given ID an element of this set? |
boolean |
isEmpty()
/** Is this set empty? |
int |
maxSize()
Return the maximum number of elements in this set (can be cheap and dirty). |
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 |
| Field Detail |
protected edu.vt.marian.common.Debug debug
protected java.util.Vector v
| Constructor Detail |
public VectorWtdObjSet(edu.vt.marian.common.Debug d)
public VectorWtdObjSet(int expectedSize,
edu.vt.marian.common.Debug d)
| Method Detail |
public int add(edu.vt.marian.common.WtdObj w)
public WtdObjSetEnumeration elements()
public boolean isEmpty()
public edu.vt.marian.common.Weight isElt(edu.vt.marian.common.FullID id)
id - The (ID of the) element to be tested.NOTE: We cannot use Vector.contains() (or even indexOf()) here because Vectors compare objects by identity, not equality.
public int exactSize()
public int approxSize()
public int maxSize()
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 | |||||||