bitset64

package
v0.0.0-...-bc7e481 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: AGPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitIndex

func BitIndex(i uint64) uint64

func Buckets

func Buckets(i uint64) int

func Intersects

func Intersects(this, other Bitset) bool

func IsEmpty

func IsEmpty(b Bitset) bool

func IsSet

func IsSet[T u64](b *Bitset, t T) bool

func Iter

func Iter(b *Bitset) iter64

func IterT

func IterT[T ~uint64](b *Bitset) iter64T[T]

func Set

func Set[T u64](b *Bitset, t T) bool

func ToRawParts

func ToRawParts(b Bitset) []uint64

func Unset

func Unset[T u64](b *Bitset, t T)

Types

type Bitset

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

func Copy

func Copy(b Bitset) Bitset

func Create

func Create(members ...uint64) Bitset

func CreateT

func CreateT[T u64](members ...T) Bitset

func FromRaw

func FromRaw(parts []uint64) Bitset

func New

func New(i int) Bitset

func WithBucketsFor

func WithBucketsFor(i uint64) Bitset

func (Bitset) Complement

func (this Bitset) Complement() Bitset

func (Bitset) Difference

func (this Bitset) Difference(n Bitset) Bitset

func (Bitset) Elems

func (this Bitset) Elems() []uint64

func (Bitset) Eq

func (this Bitset) Eq(n Bitset) bool

func (Bitset) Intersect

func (this Bitset) Intersect(n Bitset) Bitset

func (Bitset) IsEmpty

func (this Bitset) IsEmpty() bool

func (Bitset) IsSet

func (this Bitset) IsSet(i uint64) bool

func (Bitset) Len

func (this Bitset) Len() int

func (Bitset) Pop

func (this Bitset) Pop() uint64

func (*Bitset) Set

func (this *Bitset) Set(i uint64) bool

func (Bitset) Union

func (this Bitset) Union(n Bitset) Bitset

func (Bitset) Unset

func (this Bitset) Unset(i uint64)

type IterOf

type IterOf[T ~uint64] interface {
	All(func(T) bool)
	Buckets(func(uint64) bool)
	UntilEmpty(func(T) bool)
}

Jump to

Keyboard shortcuts

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