public final class PagedMutable extends LongValues
PagedMutable. This class slices data into fixed-size blocks
which have the same number of bits per value. It can be a useful replacement
for PackedInts.Mutable to store more than 2B values.EMPTY| Constructor and Description |
|---|
PagedMutable(long size,
int pageSize,
int bitsPerValue,
float acceptableOverheadRatio)
Create a new
PagedMutable instance. |
| Modifier and Type | Method and Description |
|---|---|
long |
get(long index)
Get value at
index. |
T |
grow()
Similar to
ArrayUtil.grow(long[]). |
T |
grow(long minSize)
Similar to
ArrayUtil.grow(long[], int). |
long |
ramBytesUsed()
Return the number of bytes used by this object.
|
T |
resize(long newSize)
Create a new copy of size
newSize based on the content of
this buffer. |
void |
set(long index,
long value)
Set value at
index. |
long |
size()
The number of values.
|
String |
toString() |
getpublic PagedMutable(long size,
int pageSize,
int bitsPerValue,
float acceptableOverheadRatio)
PagedMutable instance.size - the number of values to store.pageSize - the number of values per pagebitsPerValue - the number of bits per valueacceptableOverheadRatio - an acceptable overhead ratiopublic final long size()
public final long get(long index)
LongValuesindex.get in class LongValuespublic final void set(long index,
long value)
index.public long ramBytesUsed()
public final T resize(long newSize)
newSize based on the content of
this buffer. This method is much more efficient than creating a new
instance and copying values one by one.public final T grow(long minSize)
ArrayUtil.grow(long[], int).public final T grow()
ArrayUtil.grow(long[]).Copyright © 2010 - 2020 Adobe. All Rights Reserved