The bitset Module¶

<bitset>
Primary Class¶  Superclasses
 InitKeywords
allmembersfrom – If this is a nonnegative integer then the set created will be infinite. All integers greater than or equal to the one supplied will be members of the set. The default is
#f
.membervector –
members – If supplied, this gives the initial elements of the set as a sequence of integers.
pad –
upperboundhint – An integer which indicates that all the elements of the set are expected to below this value. This is merely an aid to the implementation when allocating the set, and integers which are greater than or equal to this number can be added at any time. The default is zero.
 Discussion
Represents finite sets and some infinite sets over the nonnegative integers in an efficient manner using a
<bitvector>
. The infinite sets which can be represented are those which are the complement of a finite set.

copybitset!
Function¶

emptybitset!
Function¶  Signature
emptybitset! set => ()
 Parameters
set – An instance of
<bitset>
.
 Discussion
Destructively modifies
set
by removing all its elements.

infinite?
Sealed Generic function¶

member?
Sealed Generic function¶

setadd
Sealed Generic function¶

setadd!
Sealed Generic function¶

setcomplement
Sealed Generic function¶

setcomplement!
Sealed Generic function¶

setdifference
Sealed Generic function¶  Signature
setdifference set1 set2 => newset
 Parameters
 Values
newset – An instance of
<bitset>
.
 Discussion
Returns a new bitset whose elements are determined by removing elements from
set1
which are also members ofset2
. Neitherset1
orset2
will be altered.

setdifference!
Sealed Generic function¶

setintersection
Sealed Generic function¶

setintersection!
Sealed Generic function¶

setremove
Sealed Generic function¶

setremove!
Sealed Generic function¶  Signature
setremove! set element => newset
 Parameters
 Values
newset – An instance of
<bitset>
.
 Discussion
Modifies
set
so that it no longer containselement
. The returned set,newset == set
.element
must be a nonnegative integer.

setunion
Sealed Generic function¶

setunion!
Sealed Generic function¶

size
Sealed Generic function¶