public class WeightedIntDocVector extends Object implements IntDocVector
IntDocVector
with term weightsIntDocVector.Reader
Constructor and Description |
---|
WeightedIntDocVector() |
WeightedIntDocVector(int docLength,
HMapIFW weightedTerms) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsTerm(int termid) |
float |
dot(WeightedIntDocVector otherVector) |
int |
getDocLength() |
IntDocVector.Reader |
getReader()
Returns the reader for this
IntDocVector . |
float |
getWeight(int termid) |
HMapIFW |
getWeightedTerms() |
void |
normalizeWith(float l) |
void |
plus(WeightedIntDocVector otherVector) |
void |
readFields(DataInput in) |
void |
setDocLength(int docLength) |
void |
setWeightedTerms(HMapIFW weightedTerms) |
String |
toString() |
void |
write(DataOutput out) |
public WeightedIntDocVector()
public WeightedIntDocVector(int docLength, HMapIFW weightedTerms)
public boolean containsTerm(int termid)
public float dot(WeightedIntDocVector otherVector)
public int getDocLength()
public IntDocVector.Reader getReader() throws IOException
IntDocVector
IntDocVector
.getReader
in interface IntDocVector
IntDocVector
IOException
public float getWeight(int termid)
public HMapIFW getWeightedTerms()
public void normalizeWith(float l)
public void plus(WeightedIntDocVector otherVector)
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
public void setDocLength(int docLength)
public void setWeightedTerms(HMapIFW weightedTerms)
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException