|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
A Weighted Object Set is a set of MARIAN objects, represented as FullIDs, each of which has associated with it a Weight. The Weights are to be understood relative to each other. Typically, WtdObjSets are formed as the result of some matching operation, so that the different weights within the set imply different strengths of match to a description, or confidence in a proposition, or membership in the set. A Weighted Object Set is always presented in non-increasing Weight order, so that the "best" objects are always returned first.
For convenience, we also consider weighted objects as Java objects in their own right, since we so often need to manipulate an object and a weight together. However, in the one true religion, no Weight has meaning except in relationship to another Weight, and no object weight has significance outside of a WtdObjSet.
FullID,
Weight,
WtdObj,
WtdObjSetEnumeration| Method Summary | |
int |
approxSize()
Return the approximate number of elements in this set (can be cheap and dirty). |
WtdObjSetEnumeration |
elements()
Create an Enumeration -- actually a WtdObjSetEnumeration -- 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). |
| Method Detail |
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.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 | |||||||