bits
assigned to it from the require
.
b
and bb
as the variable names.
ipairs
on tables.
printlimit
method.
By default the limit is set to zero; the other obvious default is printing
the whole bitmap, but this can turn out to be disastrous large.
bits.new(value, number) |
return bitmap of given size set to value |
return list,
create and new are synomyms
|
b:set(value) |
set all bits to value, return bitmap |
b:set(value, n1[,n2[n3,...]]) |
set these bits to value, return bitmap |
b:get(n) |
get value of this bit |
b:get(n1[,n2[n3,...]]) |
get value of these bits |
b:iterator() |
return iterator for all bits => i,v |
b:iterator(n) |
return iterator starting at bit n => i,v |
b:iterator(n1, n2) |
return iterator over range [n1..n2] => i,v |
b:index(value) |
return iterator => next index with the value |
b:index(value, start) |
return index of next bit with the value |
b:isequal(bb) |
b == bb |
return true or false for equality |
b:notbits() |
-b |
return NOT of the bitmap |
b:orbits(bb) |
b + bb |
return OR of the bitmaps |
b:andbits(bb) |
b * bb |
return AND of the bitmaps |
b:xorbits(bb) |
b % bb |
return XOR of the bitmaps |
b:orbits(n1, n2[, n3,...]) |
return OR of these bits | |
b:andbits(n1, n2[, n3,...]) |
return AND of these bits | |
b:xorbits(n1, n2[, n3,...]) |
return XOR of these bits |
b:copy() |
return a copy of the bitmap |
b:printlimit() |
return current limit |
b:printlimit(n|"all"|"*") |
set n or all bits printed, return new limit |
b:size(), #b |
return the bit capacity |
b:ones() |
return the number of 1 bits | bits.version() |
return the version of module |