StaticBitSets.jl

Static bitsets julia
Author bottine
Popularity
4 Stars
Updated Last
1 Year Ago
Started In
May 2021

Basic immutable static bitset implementation

I wanted to use this but since there is no licence attached, I wrote my own implementation.

Summary

The only type is SBitSet{N,T} where N should be a strictly positive integer, and T either of UInt8,UInt16,UInt32,UInt64,UInt128. An element of type SBitSet{N,T} can store the integers 1:8*sizeof(T)*N.

    
using StaticBitSets

x = SBitSet{2,UInt8}(1,2,8)
y = SBitSet{2,UInt8}([1,2])
z = push(y,8)

for i in z
    println(i)
end

println(yx)
println(yx)
println(x~y)
println(yx)
println(yx)
println(8y)
println(8z)