Package org.apache.lucene.util.packed
Class PackedLongValues
java.lang.Object
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.PackedLongValues
- All Implemented Interfaces:
Accountable
Utility class to compress integers into a
LongValues instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Builder for aPackedLongValuesinstance.final classAn iterator over long values. -
Field Summary
FieldsFields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROESFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Method Summary
Modifier and TypeMethodDescriptionstatic PackedLongValues.BuilderdeltaPackedBuilder(float acceptableOverheadRatio) static PackedLongValues.BuilderdeltaPackedBuilder(int pageSize, float acceptableOverheadRatio) Return a newPackedLongValues.Builderthat will compress efficiently integers that are close to each other.final longget(long index) Get value atindex.iterator()Return an iterator over the values of this array.static PackedLongValues.BuildermonotonicBuilder(float acceptableOverheadRatio) static PackedLongValues.BuildermonotonicBuilder(int pageSize, float acceptableOverheadRatio) Return a newPackedLongValues.Builderthat will compress efficiently integers that would be a monotonic function of their index.static PackedLongValues.BuilderpackedBuilder(float acceptableOverheadRatio) static PackedLongValues.BuilderpackedBuilder(int pageSize, float acceptableOverheadRatio) Return a newPackedLongValues.Builderthat will compress efficiently positive integers.longReturn the memory usage of this object in bytes.final longsize()Get the number of values in this array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- See Also:
-
-
Method Details
-
packedBuilder
Return a newPackedLongValues.Builderthat will compress efficiently positive integers. -
packedBuilder
- See Also:
-
deltaPackedBuilder
public static PackedLongValues.Builder deltaPackedBuilder(int pageSize, float acceptableOverheadRatio) Return a newPackedLongValues.Builderthat will compress efficiently integers that are close to each other. -
deltaPackedBuilder
- See Also:
-
monotonicBuilder
public static PackedLongValues.Builder monotonicBuilder(int pageSize, float acceptableOverheadRatio) Return a newPackedLongValues.Builderthat will compress efficiently integers that would be a monotonic function of their index. -
monotonicBuilder
- See Also:
-
size
public final long size()Get the number of values in this array. -
get
public final long get(long index) Description copied from class:LongValuesGet value atindex.- Specified by:
getin classLongValues
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
iterator
Return an iterator over the values of this array.
-