bitset

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 1 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitSet

type BitSet struct {
	// contains filtered or unexported fields
}

BitSet is a specialized bitset that does not perform heap allocations if the range of values in the bitset is small (e.g., [0, 64)). It falls back to github.com/willf/bitset for large value ranges.

func New

func New(maxExclusive uint) BitSet

New can be used to keep track of values between [0, maxExclusive). Calling APIs with values outside that range may lead to incorrect results.

func (*BitSet) All

func (bs *BitSet) All(maxExclusive uint) bool

All returns true if all the bits for values between [0, maxExclusive) are set.

func (*BitSet) Set

func (bs *BitSet) Set(i uint)

Set sets the bit associated with the given value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL