- java.lang.Object
-
- org.apache.lucene.codecs.lucene99.ForDeltaUtil
-
public class ForDeltaUtil extends java.lang.Object
Utility class to encode/decode increasing sequences of 128 integers.
-
-
Field Summary
Fields Modifier and Type Field Description private ForUtil
forUtil
private static long[]
IDENTITY_PLUS_ONE
-
Constructor Summary
Constructors Constructor Description ForDeltaUtil(ForUtil forUtil)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (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 Detail
-
IDENTITY_PLUS_ONE
private static final long[] IDENTITY_PLUS_ONE
-
forUtil
private final ForUtil forUtil
-
-
Constructor Detail
-
ForDeltaUtil
ForDeltaUtil(ForUtil forUtil)
-
-
Method Detail
-
prefixSumOfOnes
private static void prefixSumOfOnes(long[] arr, long base)
-
encodeDeltas
void encodeDeltas(long[] longs, DataOutput out) throws java.io.IOException
Encode deltas of a strictly monotonically increasing sequence of integers. The providedlongs
are expected to be deltas between consecutive values.- Throws:
java.io.IOException
-
decodeAndPrefixSum
void decodeAndPrefixSum(DataInput in, long base, long[] longs) throws java.io.IOException
Decode deltas, compute the prefix sum and addbase
to all decoded longs.- Throws:
java.io.IOException
-
-