org.apache.lucene.util.packed
public class EliasFanoDecoder extends Object
EliasFanoEncoder
.Modifier and Type | Field and Description |
---|---|
static long |
NO_MORE_VALUES |
Constructor and Description |
---|
EliasFanoDecoder(EliasFanoEncoder efEncoder)
Construct a decoder for a given
EliasFanoEncoder . |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final long NO_MORE_VALUES
public EliasFanoDecoder(EliasFanoEncoder efEncoder)
EliasFanoEncoder
.
The decoding index is set to just before the first encoded value.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
.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.