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.
|
long |
currentIndex()
The current decoding index.
|
long |
currentValue()
The value at the current decoding index.
|
EliasFanoEncoder |
getEliasFanoEncoder() |
long |
nextValue()
If another value is available after the current decoding index, return this value and
and increase the decoding index by 1.
|
long |
numEncoded()
The number of values encoded by the encoder.
|
long |
previousValue()
If another value is available before the current decoding index, return this value
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 numEncoded()
public long currentIndex()
EliasFanoEncoder.encodeNext(long)
has index 0.
Only valid directly after
nextValue()
, advanceToValue(long)
,
previousValue()
, or backToValue(long)
returned another value than NO_MORE_VALUES
,
or advanceToIndex(long)
returned true.advanceToIndex(long)
.public long currentValue()
currentIndex()
would return a valid result.
advanceToIndex(long)
returned true.currentIndex()
.public void toBeforeSequence()
public long nextValue()
NO_MORE_VALUES
.public boolean advanceToIndex(long index)
true
iff it is available.
currentValue()
.
backToIndex
.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-2014 Apache Software Foundation. All Rights Reserved.