public class DocumentVectorVIntArray extends Object implements DocumentVector
| Modifier and Type | Method and Description |
|---|---|
int[] |
decompressDocument()
Decompresses the document vector into a flat array representation
|
int[][] |
decompressPositions(int[] terms)
Decompresses/constructs positions.
|
boolean |
equals(Object o) |
int |
getDocumentLength() |
static DocumentVectorVIntArray |
newInstance(int[] data)
Constructs a document vector and compresses it using Variable-Length Integer coding.
|
void |
readFields(DataInput input) |
static DocumentVectorVIntArray |
readInstance(DataInput input)
Reads and returns an instance of this class from input
|
int[] |
transformTerms(int[] terms)
Transforms query terms
|
void |
write(DataOutput output) |
public int[] decompressDocument()
throws IOException
DocumentVectordecompressDocument in interface DocumentVectorIOExceptionpublic int[][] decompressPositions(int[] terms)
throws IOException
DocumentVectordecompressPositions in interface DocumentVectorterms - Query termsIOExceptionpublic int getDocumentLength()
getDocumentLength in interface DocumentVectorpublic static DocumentVectorVIntArray newInstance(int[] data) throws IOException
data - Flat array representation of a documentIOExceptionpublic void readFields(DataInput input) throws IOException
readFields in interface WritableIOExceptionpublic static DocumentVectorVIntArray readInstance(DataInput input) throws IOException
input - DataInputIOExceptionpublic int[] transformTerms(int[] terms)
DocumentVectortransformTerms in interface DocumentVectorterms - Query termspublic void write(DataOutput output) throws IOException
write in interface WritableIOException