bitset

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: GPL-3.0, LGPL-3.0 Imports: 0 Imported by: 0

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 implements a simple bit set

func New

func New() *BitSet

New creates a new bit set

func (*BitSet) Add

func (b *BitSet) Add(i int)

Add adds a bit to the set

func (*BitSet) BitCount

func (b *BitSet) BitCount() int

BitCount returns the number of bits in the set

func (*BitSet) Bytes

func (b *BitSet) Bytes() []byte

Bytes returns the byte representation

func (*BitSet) Clear

func (b *BitSet) Clear()

Clear clears all bits

func (*BitSet) Contains

func (b *BitSet) Contains(i int) bool

Contains checks if a bit is in the set

func (*BitSet) Len

func (b *BitSet) Len() int

Len returns the number of bits set

func (*BitSet) Remove

func (b *BitSet) Remove(i int)

Remove removes a bit from the set

Jump to

Keyboard shortcuts

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