java.lang.Object
org.apache.lucene.codecs.lucene99.ForDeltaUtil
Utility class to encode/decode increasing sequences of 128 integers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
decodeAndPrefixSum
(DataInput in, long base, long[] longs) Decode deltas, compute the prefix sum and addbase
to all decoded longs.(package private) void
encodeDeltas
(long[] longs, DataOutput out) Encode deltas of a strictly monotonically increasing sequence of integers.private static void
prefixSumOfOnes
(long[] arr, long base)
-
Field Details
-
IDENTITY_PLUS_ONE
private static final long[] IDENTITY_PLUS_ONE -
forUtil
-
-
Constructor Details
-
ForDeltaUtil
ForDeltaUtil(ForUtil forUtil)
-
-
Method Details
-
prefixSumOfOnes
private static void prefixSumOfOnes(long[] arr, long base) -
encodeDeltas
Encode deltas of a strictly monotonically increasing sequence of integers. The providedlongs
are expected to be deltas between consecutive values.- Throws:
IOException
-
decodeAndPrefixSum
Decode deltas, compute the prefix sum and addbase
to all decoded longs.- Throws:
IOException
-