in scala/collection/mutable
class BitSet
-
class BitSet(initSize: Int)
- extends BitSet
- with ScalaObject
-
mutable, resizable bit sets, to represent dense sets of small integers
Bit indices are between 0..(size-1) inclusive
- Author:
-
Burak Emir
- Parameters:
initSize:
-
initial size in nbits
Methods inherited from java/lang/Object-class
|
clone, eq, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, wait, wait, wait |
internal
protected val internal: ByteArray
size
var size: Int
-
size of this bitset in nbytes
ensureSize
def ensureSize(n: Int): Unit
-
ensure that this bitset can store at least nbits bits
set
final def set(i: Int, b: Boolean): Unit
-
calls set or clear for i-th bit
set
final def set(i: Int): Unit
-
sets i-th bit to true. Grows to size i+1 if needed.
clear
def clear(i: Int): Unit
-
clears i-th bit. Grows to size i+1 if needed.
apply
def apply(i: Int): Boolean
-
gets i-th bit. Grows to size i+1 if needed.
toArray
def toArray: Array[Int]
makeImmutable
def makeImmutable: BitSet