bitarray

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.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 BitArray added in v0.7.1

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

BitArray is a simple implementation of the Bitarray interface.

func New

func New(size int) *BitArray

func (*BitArray) Fill added in v0.7.1

func (b *BitArray) Fill(n int)

Fill sets all bits up to the n-th bit to 1.

func (*BitArray) Get added in v0.7.1

func (b *BitArray) Get(idx int) bool

Get returns true if the bit at idx is 1.

func (*BitArray) GetByte added in v0.7.1

func (b *BitArray) GetByte(pos int) byte

GetByte returns a byte starting from the bit at index pos*8.

func (*BitArray) Set added in v0.7.1

func (b *BitArray) Set(idx int)

Set sets the bit at idx to 1.

func (*BitArray) String added in v0.7.1

func (b *BitArray) String() string

Jump to

Keyboard shortcuts

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