Documentation ¶
Overview ¶
Package bitvector contains types and methods for working with bit vectors
Index ¶
- Constants
- Variables
- type BitVector
- func (BitVector BitVector) Add(k int) error
- func (BitVector BitVector) BWAND(bv2 BitVector) (BitVector, error)
- func (BitVector BitVector) Contains(k int) bool
- func (BitVector BitVector) Delete(k int)
- func (BitVector BitVector) MaxOut()
- func (BitVector BitVector) PopCount() int
- func (BitVector BitVector) WipeOut()
Constants ¶
View Source
const MAX_INT = int(MAX_UINT >> 1)
MAX_INT
View Source
const MAX_UINT = ^uint(0)
MAX_UINT
Variables ¶
View Source
var MAX_SIZE = maxSize()
MAX_SIZE is calculated at compile time
View Source
var PC64 = pc64()
PC64 is used to determine population count, e.g. PC64[i] is the population count of i
Functions ¶
This section is empty.
Types ¶
type BitVector ¶
type BitVector []int
BitVector is the base type
func NewBitVector ¶
NewBitVector is the constructor Given the maximum value to hold in the bit vector, return an int array sized to do so
func (BitVector) MaxOut ¶
func (BitVector BitVector) MaxOut()
MaxOut is a method to flip all the bits in the bit vector to 1
Click to show internal directories.
Click to hide internal directories.