Method SufficientlySmallerThanBitSet
SufficientlySmallerThanBitSet(Int64, Int64)
Provide an indication that it is better to use an EliasFanoEncoder than a FixedBitSet to encode document identifiers. This indication is not precise and may change in the future.
An EliasFanoEncoder is favored when the size of the encoding by the EliasFanoEncoder (including some space for its index) is at most about 5/6 of the size of the FixedBitSet, this is the same as comparing estimates of the number of bits accessed by a pair of FixedBitSets and by a pair of non indexed EliasFanoDocIdSets when determining the intersections of the pairs.
A bit set is preferred when upperbound <= 256
.
It is assumed that DEFAULT_INDEX_INTERVAL is used.
Declaration
public static bool SufficientlySmallerThanBitSet(long numValues, long upperBound)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | numValues | The number of document identifiers that is to be encoded. Should be non negative. |
System.Int64 | upperBound | The maximum possible value for a document identifier. Should be at least |
Returns
Type | Description |
---|---|
System.Boolean |