Class ForDeltaUtil
- java.lang.Object
-
- org.apache.lucene.codecs.lucene84.ForDeltaUtil
-
public class ForDeltaUtil extends java.lang.ObjectUtility class to encode/decode increasing sequences of 128 integers.
-
-
Field Summary
Fields Modifier and Type Field Description private ForUtilforUtilprivate 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) voiddecodeAndPrefixSum(DataInput in, long base, long[] longs)Decode deltas, compute the prefix sum and addbaseto all decoded longs.(package private) voidencodeDeltas(long[] longs, DataOutput out)Encode deltas of a strictly monotonically increasing sequence of integers.private static voidprefixSumOfOnes(long[] arr, long base)(package private) voidskip(DataInput in)Skip a sequence of 128 longs.
-
-
-
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.IOExceptionEncode deltas of a strictly monotonically increasing sequence of integers. The providedlongsare 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 addbaseto all decoded longs.- Throws:
java.io.IOException
-
skip
void skip(DataInput in) throws java.io.IOException
Skip a sequence of 128 longs.- Throws:
java.io.IOException
-
-