Documentation ¶
Index ¶
- type FixedBitSet
- func (bs *FixedBitSet) Clear(bit int)
- func (bs *FixedBitSet) CountOnes() int
- func (bs *FixedBitSet) CountZeros() int
- func (bs *FixedBitSet) Get(bit int) bool
- func (bs *FixedBitSet) Ones() []int
- func (bs *FixedBitSet) Reset()
- func (bs *FixedBitSet) Set(bit int)
- func (bs *FixedBitSet) Size() int
- func (bs *FixedBitSet) Zeros() []int
- type FixedThreadSafeBitSet
- func (bs *FixedThreadSafeBitSet) Clear(bit int)
- func (bs *FixedThreadSafeBitSet) CountOnes() int
- func (bs *FixedThreadSafeBitSet) CountZeros() int
- func (bs *FixedThreadSafeBitSet) Get(bit int) bool
- func (bs *FixedThreadSafeBitSet) Ones() []int
- func (bs *FixedThreadSafeBitSet) Reset()
- func (bs *FixedThreadSafeBitSet) Set(bit int)
- func (bs *FixedThreadSafeBitSet) Zeros() []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FixedBitSet ¶
type FixedBitSet struct {
// contains filtered or unexported fields
}
func (*FixedBitSet) Clear ¶
func (bs *FixedBitSet) Clear(bit int)
Write zero at the given bit position.
func (*FixedBitSet) CountOnes ¶
func (bs *FixedBitSet) CountOnes() int
Return total number of ones in the bitset.
func (*FixedBitSet) CountZeros ¶
func (bs *FixedBitSet) CountZeros() int
Return total number of zeros in the bitset.
func (*FixedBitSet) Get ¶
func (bs *FixedBitSet) Get(bit int) bool
Determine if given bit position was set.
func (*FixedBitSet) Ones ¶
func (bs *FixedBitSet) Ones() []int
Return positions of all previously set bits.
func (*FixedBitSet) Zeros ¶
func (bs *FixedBitSet) Zeros() []int
Return positions of all zero-bits in the bitset.
type FixedThreadSafeBitSet ¶
type FixedThreadSafeBitSet struct {
// contains filtered or unexported fields
}
func NewFixedThreadSafe ¶
func NewFixedThreadSafe(maxBits int) *FixedThreadSafeBitSet
Thread-safe wrapper around fixed-size bitset.
func (*FixedThreadSafeBitSet) Clear ¶
func (bs *FixedThreadSafeBitSet) Clear(bit int)
func (*FixedThreadSafeBitSet) CountOnes ¶
func (bs *FixedThreadSafeBitSet) CountOnes() int
func (*FixedThreadSafeBitSet) CountZeros ¶
func (bs *FixedThreadSafeBitSet) CountZeros() int
func (*FixedThreadSafeBitSet) Get ¶
func (bs *FixedThreadSafeBitSet) Get(bit int) bool
func (*FixedThreadSafeBitSet) Ones ¶
func (bs *FixedThreadSafeBitSet) Ones() []int
func (*FixedThreadSafeBitSet) Reset ¶
func (bs *FixedThreadSafeBitSet) Reset()
func (*FixedThreadSafeBitSet) Set ¶
func (bs *FixedThreadSafeBitSet) Set(bit int)
func (*FixedThreadSafeBitSet) Zeros ¶
func (bs *FixedThreadSafeBitSet) Zeros() []int
Click to show internal directories.
Click to hide internal directories.