final class RoaringBitmapArray extends Equals
A 64-bit extension of RoaringBitmap that is optimized for cases that usually fit within a 32-bit bitmap, but may run over by a few bits on occasion.
This focus makes it different from org.roaringbitmap.longlong.Roaring64NavigableMap and org.roaringbitmap.longlong.Roaring64Bitmap which focus on sparse bitmaps over the whole 64-bit range.
Structurally, this implementation simply uses the most-significant 4 bytes to index into an array of 32-bit RoaringBitmap instances. The array is grown as necessary to accommodate the largest value in the bitmap.
*Note:* As opposed to the other two 64-bit bitmap implementations mentioned above,
this implementation cannot accommodate Long values where the most significant
bit is non-zero (i.e., negative Long values).
It cannot even accommodate values where the 4 high-order bytes are Int.MaxValue,
because then the length of the bitmaps array would be a negative number
(Int.MaxValue + 1).
- Alphabetic
- By Inheritance
- RoaringBitmapArray
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new RoaringBitmapArray()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(value: Long): Unit
Add the value to the container (set the value to
true), whether it already appears or not. - def addAll(values: Long*): Unit
Add all
valuesto the container.Add all
valuesto the container. For testing purposes only.- Attributes
- protected[delta]
- def addRange(range: NumericRange[Long]): Unit
Add all values in
rangeto the container.Add all values in
rangeto the container.- Attributes
- protected[delta]
- def addRange(range: Range): Unit
Add all values in
rangeto the container.Add all values in
rangeto the container.- Attributes
- protected[delta]
- def and(that: RoaringBitmapArray): Unit
In-place bitwise AND (this & that) operation.
In-place bitwise AND (this & that) operation.
The current bitmap is modified.
- def andNot(that: RoaringBitmapArray): Unit
In-place bitwise AND-NOT (this & ~that) operation.
In-place bitwise AND-NOT (this & ~that) operation.
The current bitmap is modified.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(that: Any): Boolean
- Definition Classes
- RoaringBitmapArray → Equals
- def cardinality: Long
Returns the number of distinct integers added to the bitmap (e.g., number of bits set).
- def clear(): Unit
Remove all values from the bitmap.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def contains(value: Long): Boolean
Checks whether the value is included, which is equivalent to checking if the corresponding bit is set.
- def copy(): RoaringBitmapArray
Copy
thisalong with underlying bitmaps to a new instance. - def deserialize(buffer: ByteBuffer): Unit
Deserialize the contents of
bufferinto this RoaringBitmapArray.Deserialize the contents of
bufferinto this RoaringBitmapArray.All existing content will be discarded!
See serialize for the expected serialization format.
- def diff(other: RoaringBitmapArray): Unit
Get values in
thisbut notthat. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- RoaringBitmapArray → Equals → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def first: Option[Long]
- def forAllInRange(start: Long, length: Int, consumer: RelativeRangeConsumer): Unit
Consume presence information for all values in the range
[start, start + length).Consume presence information for all values in the range
[start, start + length).- start
Lower bound of values to consume.
- length
Maximum number of values to consume.
- def forEach(consume: (Long) => Unit): Unit
Execute the
consumefunction for every value in the set represented by this bitmap. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- RoaringBitmapArray → AnyRef → Any
- def isEmpty: Boolean
Tests whether the bitmap is empty.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def last: Option[Long]
- def merge(other: RoaringBitmapArray): Unit
Merges the
otherset into this one. - def mkString(start: String = "", sep: String = "", end: String = ""): String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def or(that: RoaringBitmapArray): Unit
In-place bitwise OR (union) operation.
In-place bitwise OR (union) operation.
The current bitmap is modified.
- def remove(value: Long): Unit
If present, remove the
value(effectively, sets its bit value to false).If present, remove the
value(effectively, sets its bit value to false).- value
The index in a bitmap.
- Attributes
- protected[deletionvectors]
- def removeRunCompression(): Boolean
Remove run-length encoding even when it is more space efficient.
Remove run-length encoding even when it is more space efficient.
- returns
trueif a change was applied
- def runOptimize(): Boolean
Use a run-length encoding where it is more space efficient.
Use a run-length encoding where it is more space efficient.
- returns
trueif a change was applied
- def serialize(buffer: ByteBuffer, format: RoaringBitmapArrayFormat.Value): Unit
Serialize this RoaringBitmapArray into the
buffer.Serialize this RoaringBitmapArray into the
buffer.Format
- A Magic Number indicating the format used (4 bytes) - The actual data as specified by the format.
- def serializeAsByteArray(format: RoaringBitmapArrayFormat.Value): Array[Byte]
Serializes this RoaringBitmapArray and returns the serialized form as a byte array.
- def serializedSizeInBytes(format: RoaringBitmapArrayFormat.Value): Long
Report the number of bytes required to serialize this bitmap.
Report the number of bytes required to serialize this bitmap.
This is the number of bytes written out when using the serialize method.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toArray: Array[Long]
Return the set values as an array, if the cardinality is smaller than 2147483648.
Return the set values as an array, if the cardinality is smaller than 2147483648.
The integer values are in sorted order.
- def toBitmap32Bit(): RoaringBitmap
- Attributes
- protected[delta]
- def toString(): String
- Definition Classes
- AnyRef → Any
- def values: Array[Long]
Materialise the whole set into an array
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()