Documentation ¶
Overview ¶
Package bitmap provides a []bool/bitmap implementation with standardized iteration. Bitmaps are the equivalent of []bool, with improved compression for runs of similar values, and faster operations on ranges and the like.
Index ¶
- Constants
- type BitIndex
- type BitRange
- type Bitmap
- func (me *Bitmap) Add(is ...BitIndex)
- func (me *Bitmap) AddRange(begin, end BitRange)
- func (me *Bitmap) Clear()
- func (me Bitmap) Contains(i BitIndex) bool
- func (me Bitmap) Copy() (ret Bitmap)
- func (me *Bitmap) FlipRange(begin, end BitRange)
- func (me Bitmap) Get(bit BitIndex) bool
- func (me Bitmap) IsEmpty() bool
- func (me Bitmap) Iter(cb iter.Callback)
- func (me Bitmap) IterTyped(f func(int) bool) bool
- func (me Bitmap) Len() BitRange
- func (me *Bitmap) Remove(i BitIndex) bool
- func (me *Bitmap) RemoveRange(begin, end BitRange) *Bitmap
- func (me *Bitmap) Set(bit BitIndex, value bool)
- func (me *Bitmap) Sub(other Bitmap)
- func (me Bitmap) ToSortedSlice() []BitIndex
- func (me *Bitmap) Union(other Bitmap)
- type Interface
- type Iter
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitmap ¶
Bitmaps store the existence of values in [0,math.MaxUint32] more efficiently than []bool. The empty value starts with no bits set.
func (*Bitmap) RemoveRange ¶
func (Bitmap) ToSortedSlice ¶
Click to show internal directories.
Click to hide internal directories.