Documentation ¶
Index ¶
- Variables
- type Bitlist
- func (b Bitlist) BitIndices() []int
- func (b Bitlist) Contains(c Bitlist) (bool, error)
- func (b Bitlist) Count() uint64
- func (b Bitlist) Get(i uint) bool
- func (b Bitlist) Intersect(c Bitlist) []int
- func (b Bitlist) Len() uint64
- func (b Bitlist) Merge(c Bitlist) (Bitlist, error)
- func (b Bitlist) Overlaps(c Bitlist) (bool, error)
- func (b Bitlist) Set(i uint)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorsBitlistSize return when comparing two bitlists and don't share the same size. ErrorsBitlistSize = errors.New("bitlists doesn't have the same size") // ErrorBitlistOverlap return when two bitlist are being merged and they overlap ErrorBitlistOverlaps = errors.New("bitlists overlaps, not possible to merge") )
Functions ¶
This section is empty.
Types ¶
type Bitlist ¶
type Bitlist []byte
func (Bitlist) BitIndices ¶
BitIndices returns an slice of int with the indexes marked on the bitlist
func (Bitlist) Contains ¶
Contains returns true if the bitlist contains all of the bits from the provided argument bitlist.
func (Bitlist) Len ¶
Len of the bitlist returns the number of bits available in the underlying byte array.
func (Bitlist) Merge ¶
Merge merges two bitlists with the same size, returns error if the bitlists overlaps on any bit or has different sizes
Click to show internal directories.
Click to hide internal directories.