A simple and easy-to-use bitmap library based on Go language / 一个基于Go语言实现的简单易用的bitmap库
MIT License
A simple and easy-to-use bitmap library based on Go language.
m1 := Bitmap{}
m1.Add(1)
m1.Add(10)
m1.Add(999)
m2 := Bitmap{}
m2.Add(1)
m2.Add(10)
m2.Add(998)
m1.IntersectWith(&m2)
fmt.Printf("%v", m1.Elems())
Add
add the element to the setRemove
remove the element in the setClear
make the bitmap emptyCopy
copy the bitmap to a new bitmapHas
whether the element already exists in the setElems
return the every element in the setUnionWith
calculate the unionSetIntersectWith
calculate the interSetDifferenceWith
calculate the differenceSetMIT