Skip to content

bottine/StaticBitSets.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

static bitsets julia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages