public final class MutableRoaringArray extends Object implements Cloneable, Externalizable, PointableRoaringArray
| Modifier and Type | Field and Description |
|---|---|
protected static int |
INITIAL_CAPACITY |
protected boolean |
mayHaveRunContainers |
protected static int |
NO_OFFSET_THRESHOLD |
protected static short |
SERIAL_COOKIE |
protected static short |
SERIAL_COOKIE_NO_RUNCONTAINER |
| Modifier | Constructor and Description |
|---|---|
protected |
MutableRoaringArray() |
| Modifier and Type | Method and Description |
|---|---|
int |
advanceUntil(short x,
int pos)
Find the smallest integer index larger than pos such that getKeyAtIndex(index)>=x.
|
protected void |
append(short key,
MappeableContainer value) |
protected void |
appendCopiesAfter(PointableRoaringArray highLowContainer,
short beforeStart)
Append copies of the values AFTER a specified key (may or may not be
present) to end.
|
protected void |
appendCopiesUntil(PointableRoaringArray highLowContainer,
short stoppingKey)
Append copies of the values from another array, from the start
|
protected void |
appendCopy(PointableRoaringArray highLowContainer,
int startingIndex,
int end)
Append copies of the values from another array
|
protected void |
appendCopy(short key,
MappeableContainer value) |
protected void |
clear() |
MutableRoaringArray |
clone()
Create an independent copy of the underlying array
|
protected void |
copyRange(int begin,
int end,
int newBegin) |
void |
deserialize(DataInput in)
Deserialize.
|
protected void |
extendArray(int k) |
int |
getCardinality(int i)
Returns the cardinality of the container at the given index.
|
MappeableContainer |
getContainer(short x) |
MappeableContainer |
getContainerAtIndex(int i) |
org.roaringbitmap.buffer.MappeableContainerPointer |
getContainerPointer() |
org.roaringbitmap.buffer.MappeableContainerPointer |
getContainerPointer(int startIndex) |
int |
getIndex(short x) |
short |
getKeyAtIndex(int i) |
int |
hashCode() |
boolean |
hasRunCompression()
Check whether this bitmap has had its runs compressed.
|
protected int |
headerSize() |
protected void |
insertNewKeyValueAt(int i,
short key,
MappeableContainer value) |
void |
readExternal(ObjectInput in) |
protected void |
removeAtIndex(int i) |
protected void |
removeIndexRange(int begin,
int end) |
protected void |
replaceKeyAndContainerAtIndex(int i,
short key,
MappeableContainer c) |
protected void |
resize(int newLength) |
void |
serialize(DataOutput out)
Serialize.
|
int |
serializedSizeInBytes()
Report the number of bytes required for serialization.
|
protected void |
setContainerAtIndex(int i,
MappeableContainer c) |
int |
size() |
void |
writeExternal(ObjectOutput out) |
protected static final int INITIAL_CAPACITY
protected static final short SERIAL_COOKIE_NO_RUNCONTAINER
protected static final short SERIAL_COOKIE
protected static final int NO_OFFSET_THRESHOLD
protected boolean mayHaveRunContainers
protected void append(short key,
MappeableContainer value)
protected void appendCopiesAfter(PointableRoaringArray highLowContainer, short beforeStart)
highLowContainer - the other arraybeforeStart - given key is the largest key that we won't copyprotected void appendCopiesUntil(PointableRoaringArray highLowContainer, short stoppingKey)
highLowContainer - the other arraystoppingKey - any equal or larger key in other array will terminate copyingprotected void appendCopy(PointableRoaringArray highLowContainer, int startingIndex, int end)
highLowContainer - other arraystartingIndex - starting index in the other arrayend - last index array in the other arrayprotected void appendCopy(short key,
MappeableContainer value)
protected void clear()
public MutableRoaringArray clone()
PointableRoaringArrayclone in interface PointableRoaringArrayclone in class Objectpublic void deserialize(DataInput in) throws IOException
in - the DataInput streamIOException - Signals that an I/O exception has occurred.protected void extendArray(int k)
public MappeableContainer getContainer(short x)
getContainer in interface PointableRoaringArrayx - 16-bit keypublic MappeableContainer getContainerAtIndex(int i)
getContainerAtIndex in interface PointableRoaringArrayi - indexpublic org.roaringbitmap.buffer.MappeableContainerPointer getContainerPointer()
getContainerPointer in interface PointableRoaringArraypublic org.roaringbitmap.buffer.MappeableContainerPointer getContainerPointer(int startIndex)
getContainerPointer in interface PointableRoaringArraystartIndex - starting indexpublic int getIndex(short x)
getIndex in interface PointableRoaringArrayx - 16-bit keypublic short getKeyAtIndex(int i)
getKeyAtIndex in interface PointableRoaringArrayi - the indexpublic int advanceUntil(short x,
int pos)
PointableRoaringArrayadvanceUntil in interface PointableRoaringArrayx - minimal valuepos - index to exceedprotected void insertNewKeyValueAt(int i,
short key,
MappeableContainer value)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected void removeAtIndex(int i)
protected void removeIndexRange(int begin,
int end)
protected void resize(int newLength)
protected void copyRange(int begin,
int end,
int newBegin)
public boolean hasRunCompression()
PointableRoaringArrayhasRunCompression in interface PointableRoaringArraypublic void serialize(DataOutput out) throws IOException
serialize in interface PointableRoaringArrayout - the DataOutput streamIOException - Signals that an I/O exception has occurred.public int serializedSizeInBytes()
serializedSizeInBytes in interface PointableRoaringArrayprotected int headerSize()
protected void setContainerAtIndex(int i,
MappeableContainer c)
protected void replaceKeyAndContainerAtIndex(int i,
short key,
MappeableContainer c)
public int size()
size in interface PointableRoaringArraypublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic int getCardinality(int i)
PointableRoaringArraygetCardinality in interface PointableRoaringArrayi - indexCopyright © 2015. All Rights Reserved.