Documentation
¶
Overview ¶
Package bitset is sample code illustrating possible implementations of a Bitset in Go, with benchmarks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitset ¶
type Bitset interface {
GetBit(i int) bool
SetBit(i int, value bool)
// Len is the length of the bitset, in bits.
// Its semantics may vary slightly depending on the implementation.
Len() int
}
Bitset is the minimum set of features common to my Bitset implementations.
type BitsetBigInt ¶
func NewBigInt ¶
func NewBigInt() BitsetBigInt
func (BitsetBigInt) GetBit ¶
func (b BitsetBigInt) GetBit(i int) bool
func (BitsetBigInt) Len ¶
func (b BitsetBigInt) Len() int
func (BitsetBigInt) SetBit ¶
func (b BitsetBigInt) SetBit(i int, value bool)
type BitsetBool ¶
type BitsetBool []bool
func (BitsetBool) GetBit ¶
func (b BitsetBool) GetBit(i int) bool
func (BitsetBool) Len ¶
func (b BitsetBool) Len() int
func (BitsetBool) SetBit ¶
func (b BitsetBool) SetBit(i int, value bool)
type BitsetBoolDyn ¶
type BitsetBoolDyn []bool
func (*BitsetBoolDyn) GetBit ¶
func (b *BitsetBoolDyn) GetBit(i int) bool
func (*BitsetBoolDyn) Len ¶
func (b *BitsetBoolDyn) Len() int
func (*BitsetBoolDyn) SetBit ¶
func (b *BitsetBoolDyn) SetBit(i int, value bool)
type BitsetUint64 ¶
type BitsetUint64 []uint64
func NewUint64 ¶
func NewUint64(n int) BitsetUint64
func (BitsetUint64) GetBit ¶
func (b BitsetUint64) GetBit(index int) bool
func (BitsetUint64) Len ¶
func (b BitsetUint64) Len() int
func (BitsetUint64) SetBit ¶
func (b BitsetUint64) SetBit(index int, value bool)
type BitsetUint8 ¶
type BitsetUint8 []uint8
func NewUint8 ¶
func NewUint8(n int) BitsetUint8
func (BitsetUint8) GetBit ¶
func (b BitsetUint8) GetBit(index int) bool
func (BitsetUint8) Len ¶
func (b BitsetUint8) Len() int
func (BitsetUint8) SetBit ¶
func (b BitsetUint8) SetBit(index int, value bool)
type BitsetWillf ¶
func (*BitsetWillf) GetBit ¶
func (b *BitsetWillf) GetBit(i int) bool
func (*BitsetWillf) Len ¶
func (b *BitsetWillf) Len() int
func (*BitsetWillf) SetBit ¶
func (b *BitsetWillf) SetBit(i int, value bool)
Click to show internal directories.
Click to hide internal directories.