Class EliasFanoDecoder
A decoder for an EliasFanoEncoder.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Util.Packed
Assembly: Lucene.Net.dll
Syntax
public class EliasFanoDecoder
  Constructors
EliasFanoDecoder(EliasFanoEncoder)
Construct a decoder for a given EliasFanoEncoder. The decoding index is set to just before the first encoded value.
Declaration
public EliasFanoDecoder(EliasFanoEncoder efEncoder)
  Parameters
| Type | Name | Description | 
|---|---|---|
| EliasFanoEncoder | efEncoder | 
Fields
NO_MORE_VALUES
A decoder for an EliasFanoEncoder.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public const long NO_MORE_VALUES = -1
  Field Value
| Type | Description | 
|---|---|
| long | 
Properties
EliasFanoEncoder
A decoder for an EliasFanoEncoder.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public virtual EliasFanoEncoder EliasFanoEncoder { get; }
  Property Value
| Type | Description | 
|---|---|
| EliasFanoEncoder | The Elias-Fano encoder that is decoded.  | 
      
NumEncoded
The number of values encoded by the encoder.
Declaration
public virtual long NumEncoded { get; }
  Property Value
| Type | Description | 
|---|---|
| long | The number of values encoded by the encoder.  | 
      
Methods
AdvanceToIndex(long)
Advance the decoding index to a given index.
and return true iff it is available.
BackToIndex().
Declaration
public virtual bool AdvanceToIndex(long index)
  Parameters
| Type | Name | Description | 
|---|---|---|
| long | index | 
Returns
| Type | Description | 
|---|---|
| bool | 
AdvanceToValue(long)
Given a target value, advance the decoding index to the first bigger or equal value
and return it if it is available. Otherwise return NO_MORE_VALUES.
Declaration
public virtual long AdvanceToValue(long target)
  Parameters
| Type | Name | Description | 
|---|---|---|
| long | target | 
Returns
| Type | Description | 
|---|---|
| long | 
BackToValue(long)
Given a target value, go back to the first smaller or equal value and return it if it is available. Otherwise return NO_MORE_VALUES.
The current implementation does not use the index on the upper zero bit positions.Declaration
public virtual long BackToValue(long target)
  Parameters
| Type | Name | Description | 
|---|---|---|
| long | target | 
Returns
| Type | Description | 
|---|---|
| long | 
CurrentIndex()
The current decoding index.
The first value encoded by 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.
Declaration
public virtual long CurrentIndex()
  Returns
| Type | Description | 
|---|---|
| long | The decoding index of the last decoded value, or as last set by AdvanceToIndex(long).  | 
      
CurrentValue()
The value at the current decoding index. Only valid when CurrentIndex() would return a valid result.
This is only intended for use after AdvanceToIndex(long) returnedtrue.
Declaration
public virtual long CurrentValue()
  Returns
| Type | Description | 
|---|---|
| long | The value encoded at CurrentIndex().  | 
      
NextValue()
If another value is available after the current decoding index, return this value and and increase the decoding index by 1. Otherwise return NO_MORE_VALUES.
Declaration
public virtual long NextValue()
  Returns
| Type | Description | 
|---|---|
| long | 
PreviousValue()
If another value is available before the current decoding index, return this value and decrease the decoding index by 1. Otherwise return NO_MORE_VALUES.
Declaration
public virtual long PreviousValue()
  Returns
| Type | Description | 
|---|---|
| long | 
ToAfterSequence()
Set the decoding index to just after the last encoded value.
Declaration
public virtual void ToAfterSequence()
  ToBeforeSequence()
Set the decoding index to just before the first encoded value.
Declaration
public virtual void ToBeforeSequence()