public class PseudoJudgments extends Object implements Writable
Constructor and Description |
---|
PseudoJudgments()
Constructs a pseudo judgment with an empty list of documents
|
Modifier and Type | Method and Description |
---|---|
void |
add(int docno,
float weight)
Adds a pseudo relevence judgment to the current object.
|
void |
clear()
Resets the current pseudo judgment.
|
int |
getDocno(int i)
Retrieves the document id at the given index.
|
float |
getWeight(int i)
Retrieves the weight for the document at the given index.
|
void |
readFields(DataInput in) |
int |
size()
Retrieves the number of pseudo judgments.
|
float |
sumWeights() |
String |
toString() |
void |
write(DataOutput out) |
public PseudoJudgments()
public void add(int docno, float weight)
docno
- Document id.weight
- Relevence score.public void clear()
public int getDocno(int i)
i
- Indexpublic float getWeight(int i)
i
- Indexpublic void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
public int size()
public float sumWeights()
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException