Documentation ¶
Overview ¶
Package bitvector provides functionality of a simple bit vector implementation.
Index ¶
- type BitVector
- func (bv *BitVector) Bytes() []byte
- func (bv *BitVector) Equals() bool
- func (bv *BitVector) Get(i int) bool
- func (bv *BitVector) Len() int
- func (bv *BitVector) Set(i int)
- func (bv *BitVector) SetBytes(bs []byte) error
- func (bv *BitVector) String() (s string)
- func (bv *BitVector) Unset(i int)
- func (bv *BitVector) UnsetBytes(bs []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitVector ¶
type BitVector struct {
// contains filtered or unexported fields
}
BitVector is a convenience object for manipulating and representing bit vectors
func NewFromBytes ¶
NewFromBytes creates a bit vector from the passed byte slice.
Leftmost bit in byte slice becomes leftmost bit in bit vector
func (*BitVector) Set ¶
Set sets the bit corresponding to the index in the bitvector, counted from left to right
func (*BitVector) SetBytes ¶
SetBytes sets all bits in the bitvector that are set in the argument
The argument must be the same as the bitvector length
func (*BitVector) UnsetBytes ¶
UnsetBytes UNSETS all bits in the bitvector that are set in the argument
The argument must be the same as the bitvector length
Click to show internal directories.
Click to hide internal directories.