in scala.collection
class BitSet

abstract class BitSet
extends java.lang.Object
with (scala.Int) => scala.Boolean
with scala.collection.Set[scala.Int]
with scala.ScalaObject
The class BitSet provides the interface for a space-efficient implementation of dense integer sets represented as bits in array of integers. Bit indices are between 0..(capacity-1) inclusive.
author:
Burak Emir, Stephane Micheloud, Nikolay Mihaylov
version:
1.1

Constructor Summary
def this



Def Summary
protected def arr : scala.Array[scala.Int]

def capacity : scala.Int

def contains ( i : scala.Int ) : scala.Boolean

final def elements : scala.Iterator[scala.Int]
returns an iterator over the truth values of all bits
override def equals ( that : scala.Any ) : scala.Boolean
Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet
final protected def mask ( n : scala.Int ) : scala.Int

final protected def memsize ( n : scala.Int ) : scala.Int

final protected def nbits ( n : scala.Int ) : scala.Int

final protected def offset ( n : scala.Int ) : scala.Int

def size : scala.Int
number of bits in this bitset
override def subsetOf ( that : scala.collection.Set[scala.Int] ) : scala.Boolean
Checks if this set is a subset of set that. Uses accelerated (32 x faster) check if the other set is a BitSet
def toArray : scala.Array[scala.Int]



Constructor Detail
def this

Def Detail
protected def arr : scala.Array[scala.Int]

def capacity : scala.Int

def contains ( i : scala.Int ) : scala.Boolean
return:
true if bit i is set

final def elements : scala.Iterator[scala.Int]
returns an iterator over the truth values of all bits

override def equals ( that : scala.Any ) : scala.Boolean
Checks if two bitsets are structurally identical. Uses accelerated (32 x faster) check if the other set is a BitSet
return:
true, iff both bitsets contain the same elements.

final protected def mask ( n : scala.Int ) : scala.Int
return:
a mask with 1 at the position of the bit

final protected def memsize ( n : scala.Int ) : scala.Int
return:
the number of Int cells needed to store n bits

final protected def nbits ( n : scala.Int ) : scala.Int
return:
the number of bits represented by n words

final protected def offset ( n : scala.Int ) : scala.Int
return:
the position in the array where the bit resides

def size : scala.Int
number of bits in this bitset

override def subsetOf ( that : scala.collection.Set[scala.Int] ) : scala.Boolean
Checks if this set is a subset of set that. Uses accelerated (32 x faster) check if the other set is a BitSet
param:
that another set.
return:
true, iff the other set is a superset of this set.

def toArray : scala.Array[scala.Int]
return:
a copy of the array underlying this bitset