Module org.apache.lucene.core
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
public class MonotonicBlockPackedReader extends LongValues implements Accountable
Provides random access to a stream written withMonotonicBlockPackedWriter
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float[]
averages
private static int
BLOCK_BITS
private static int
BLOCK_SIZE
(package private) int
blockMask
(package private) int
blockShift
(package private) long[]
minValues
private static int
MOD_MASK
(package private) LongValues[]
subReaders
(package private) long
sumBPV
(package private) long
totalByteCount
(package private) long
valueCount
-
Fields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROES
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static long
expected(long origin, float average, int index)
long
get(long index)
Get value atindex
.static MonotonicBlockPackedReader
of(IndexInput in, int packedIntsVersion, int blockSize, long valueCount)
Sole constructor.long
ramBytesUsed()
Return the memory usage of this object in bytes.long
size()
Returns the number of valuesjava.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
BLOCK_SIZE
private static final int BLOCK_SIZE
- See Also:
- Constant Field Values
-
BLOCK_BITS
private static final int BLOCK_BITS
- See Also:
- Constant Field Values
-
MOD_MASK
private static final int MOD_MASK
- See Also:
- Constant Field Values
-
blockShift
final int blockShift
-
blockMask
final int blockMask
-
valueCount
final long valueCount
-
minValues
final long[] minValues
-
averages
final float[] averages
-
subReaders
final LongValues[] subReaders
-
sumBPV
final long sumBPV
-
totalByteCount
final long totalByteCount
-
-
Constructor Detail
-
MonotonicBlockPackedReader
private MonotonicBlockPackedReader(IndexInput in, int packedIntsVersion, int blockSize, long valueCount) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
expected
static long expected(long origin, float average, int index)
-
of
public static MonotonicBlockPackedReader of(IndexInput in, int packedIntsVersion, int blockSize, long valueCount) throws java.io.IOException
Sole constructor.- Throws:
java.io.IOException
-
get
public long get(long index)
Description copied from class:LongValues
Get value atindex
.- Specified by:
get
in classLongValues
-
size
public long size()
Returns the number of values
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-