|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BitIndexPointer
A pointer implementation for BitPostingIndex structures. It has all the attrbutes of a Pointer. However, BitIndexPointer supports a FileNumber attribute, which allows a single Bit structure to be represented by several underlying files. Moreover, as this is a BitFilePosition, the offset is recorded in terms of bytes (a long) and bits (a byte). In practive, the FileNumber is recorded in 5 spare bits of the "bit" byte, so valid FileNumbers are 0-31 (MAX_FILE_ID).
| Field Summary | |
|---|---|
static byte |
BIT_MASK
amount to mask byte by to obtain bit offset |
static byte |
FILE_SHIFT
amount to shift byte by to obtain file id |
static byte |
MAX_FILE_ID
largest permissible file id using most implementations |
| Method Summary | |
|---|---|
byte |
getFileNumber()
Returns the file number: 0-32 |
void |
setBitIndexPointer(BitIndexPointer pointer)
Update this pointer to reflect the same values as the specified pointer |
void |
setFileNumber(byte fileId)
Set the file number |
| Methods inherited from interface org.terrier.structures.BitFilePosition |
|---|
getOffset, getOffsetBits, setOffset, setOffset |
| Methods inherited from interface org.apache.hadoop.io.Writable |
|---|
readFields, write |
| Methods inherited from interface org.terrier.structures.Pointer |
|---|
getNumberOfEntries, pointerToString, setNumberOfEntries, setPointer |
| Field Detail |
|---|
static final byte MAX_FILE_ID
static final byte BIT_MASK
static final byte FILE_SHIFT
| Method Detail |
|---|
void setBitIndexPointer(BitIndexPointer pointer)
pointer - - pointer to use to set the offset, bit offset
and file Id parameters.void setFileNumber(byte fileId)
byte getFileNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||