public class DocumentVectorPForDeltaArray 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 DocumentVectorPForDeltaArray |
newInstance(int[] document)
Constructs a new document vector and compresses it using PForDelta
|
void |
readFields(DataInput input) |
static DocumentVectorPForDeltaArray |
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
DocumentVector
decompressDocument
in interface DocumentVector
IOException
public int[][] decompressPositions(int[] terms) throws IOException
DocumentVector
decompressPositions
in interface DocumentVector
terms
- Query termsIOException
public int getDocumentLength()
getDocumentLength
in interface DocumentVector
public static DocumentVectorPForDeltaArray newInstance(int[] document)
document
- Flat array representation of a documentpublic void readFields(DataInput input) throws IOException
readFields
in interface Writable
IOException
public static DocumentVectorPForDeltaArray readInstance(DataInput input) throws IOException
input
- DataInputIOException
public int[] transformTerms(int[] terms)
DocumentVector
transformTerms
in interface DocumentVector
terms
- Query termspublic void write(DataOutput output) throws IOException
write
in interface Writable
IOException