Package org.apache.lucene.util.packed
Class MonotonicBlockPackedReader
java.lang.Object
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.MonotonicBlockPackedReader
- All Implemented Interfaces:
Accountable
Provides random access to a stream written with
MonotonicBlockPackedWriter.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final float[](package private) final int(package private) final int(package private) final long[](package private) final PackedInts.Reader[](package private) final long(package private) final longFields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROESFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) -
Method Summary
Modifier and TypeMethodDescription(package private) static longexpected(long origin, float average, int index) longget(long index) Get value atindex.static MonotonicBlockPackedReaderof(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) Sole constructor.longReturn the memory usage of this object in bytes.longsize()Returns the number of valuestoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
blockShift
final int blockShift -
blockMask
final int blockMask -
valueCount
final long valueCount -
minValues
final long[] minValues -
averages
final float[] averages -
subReaders
-
sumBPV
final long sumBPV
-
-
Constructor Details
-
MonotonicBlockPackedReader
private MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException - Throws:
IOException
-
-
Method Details
-
expected
static long expected(long origin, float average, int index) -
of
public static MonotonicBlockPackedReader of(IndexInput in, int packedIntsVersion, int blockSize, long valueCount, boolean direct) throws IOException Sole constructor.- Throws:
IOException
-
get
public long get(long index) Description copied from class:LongValuesGet value atindex.- Specified by:
getin classLongValues
-
size
public long size()Returns the number of values -
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
-
toString
-