|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.util.packed.EliasFanoDecoder
public class EliasFanoDecoder
A decoder for an EliasFanoEncoder
.
Field Summary | |
---|---|
static long |
NO_MORE_VALUES
|
Constructor Summary | |
---|---|
EliasFanoDecoder(EliasFanoEncoder efEncoder)
Construct a decoder for a given EliasFanoEncoder . |
Method Summary | |
---|---|
boolean |
advanceToIndex(long index)
Advance the decoding index to a given index. |
long |
advanceToValue(long target)
Given a target value, advance the decoding index to the first bigger or equal value and return it if it is available. |
long |
backToValue(long target)
Given a target value, go back to the first smaller or equal value and return it if it is available. |
EliasFanoEncoder |
getEliasFanoEncoder()
Return the Elias-Fano encoder that is decoded. |
long |
index()
Return the index of the last decoded value. |
long |
nextValue()
If another value is available after the current decoding index, return this value and and increase the decoding index by 1. |
long |
previousValue()
If another value is available before the current decoding index, return this value and and decrease the decoding index by 1. |
void |
toAfterSequence()
Set the decoding index to just after the last encoded value. |
void |
toBeforeSequence()
Set the decoding index to just before the first encoded value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long NO_MORE_VALUES
Constructor Detail |
---|
public EliasFanoDecoder(EliasFanoEncoder efEncoder)
EliasFanoEncoder
.
The decoding index is set to just before the first encoded value.
Method Detail |
---|
public EliasFanoEncoder getEliasFanoEncoder()
public long index()
EliasFanoEncoder.encodeNext(long)
has index 0.
Only valid directly after
nextValue()
, advanceToValue(long)
,
previousValue()
, or backToValue(long)
returned another value than NO_MORE_VALUES
.
public void toBeforeSequence()
public long nextValue()
NO_MORE_VALUES
.
public boolean advanceToIndex(long index)
true
iff it is available.
public long advanceToValue(long target)
NO_MORE_VALUES
.
public void toAfterSequence()
public long previousValue()
NO_MORE_VALUES
.
public long backToValue(long target)
NO_MORE_VALUES
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |