bitvec

Imports

Imports #

"math/bits"
"cmd/compile/internal/base"
"cmd/internal/src"

Constants & Variables

wordBits const #

const wordBits = 32

wordMask const #

const wordMask = *ast.BinaryExpr

wordShift const #

const wordShift = 5

Structs

BitVec struct #

A BitVec is a bit vector.

type BitVec struct {
N int32
B []uint32
}

Bulk struct #

type Bulk struct {
words []uint32
nbit int32
nword int32
}

Functions

And method #

intersection

func (dst BitVec) And(src1 BitVec, src2 BitVec)

AndNot method #

difference

func (dst BitVec) AndNot(src1 BitVec, src2 BitVec)

Clear method #

func (bv BitVec) Clear()

Copy method #

func (dst BitVec) Copy(src BitVec)

Count method #

func (bv BitVec) Count() int

Eq method #

func (bv1 BitVec) Eq(bv2 BitVec) bool

Get method #

func (bv BitVec) Get(i int32) bool

IsEmpty method #

func (bv BitVec) IsEmpty() bool

New function #

func New(n int32) BitVec

NewBulk function #

func NewBulk(nbit int32, count int32, pos src.XPos) Bulk

Next method #

bvnext returns the smallest index >= i for which bvget(bv, i) == 1. If there is no such index, bvnext returns -1.

func (bv BitVec) Next(i int32) int32

Next method #

func (b *Bulk) Next() BitVec

Not method #

func (bv BitVec) Not()

Or method #

union

func (dst BitVec) Or(src1 BitVec, src2 BitVec)

Set method #

func (bv BitVec) Set(i int32)

String method #

func (bv BitVec) String() string

Unset method #

func (bv BitVec) Unset(i int32)

Generated with Arrow