Documentation
¶
Overview ¶
nolint:mnd
nolint:mnd
Index ¶
- type Bitset32
- func (b *Bitset32) All() bool
- func (b *Bitset32) Any() bool
- func (b *Bitset32) Clear(i uint32)
- func (b *Bitset32) Clone() *Bitset32
- func (b *Bitset32) Complement() (result *Bitset32)
- func (b *Bitset32) Copy(c *Bitset32) (n uint32)
- func (b *Bitset32) Count() uint32
- func (b *Bitset32) Difference(ob *Bitset32) (result *Bitset32)
- func (b *Bitset32) Equal(c *Bitset32) bool
- func (b *Bitset32) Flip(i uint32)
- func (b *Bitset32) Intersection(ob *Bitset32) (result *Bitset32)
- func (b *Bitset32) Len() uint32
- func (b *Bitset32) None() bool
- func (b *Bitset32) Reset()
- func (b *Bitset32) Set(i uint32)
- func (b *Bitset32) String() string
- func (b *Bitset32) SymmetricDifference(ob *Bitset32) (result *Bitset32)
- func (b *Bitset32) Test(i uint32) bool
- func (b *Bitset32) ToBytes() ([]byte, error)
- func (b *Bitset32) Union(ob *Bitset32) (result *Bitset32)
- type Bitset64
- func (b *Bitset64) All() bool
- func (b *Bitset64) Any() bool
- func (b *Bitset64) CleanLastWord()
- func (b *Bitset64) Clear(i uint64)
- func (b *Bitset64) Clone() *Bitset64
- func (b *Bitset64) Copy(c *Bitset64) (n uint64)
- func (b *Bitset64) Count() uint64
- func (b *Bitset64) Difference(ob *Bitset64) (result *Bitset64)
- func (b *Bitset64) Equal(c *Bitset64) bool
- func (b *Bitset64) Flip(i uint64)
- func (b *Bitset64) Intersection(ob *Bitset64) (result *Bitset64)
- func (b *Bitset64) IsEven() bool
- func (b *Bitset64) Len() uint64
- func (b *Bitset64) None() bool
- func (b *Bitset64) Reset()
- func (b *Bitset64) Set(i uint64)
- func (b *Bitset64) String() string
- func (b *Bitset64) SymmetricDifference(ob *Bitset64) (result *Bitset64)
- func (b *Bitset64) Test(i uint64) bool
- func (b *Bitset64) ToBytes() ([]byte, error)
- func (b *Bitset64) Union(ob *Bitset64) (result *Bitset64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitset32 ¶
type Bitset32 struct {
// contains filtered or unexported fields
}
func New32 ¶
Make a new bitset with a starting capacity of n bits. The bitset expands automatically.
func NewFromBytes32 ¶
NewFromBytes32 deserializes a byte slice into a Bitset32.
func (*Bitset32) Complement ¶
Return the (local) complement of a bitset (up to n bits).
func (*Bitset32) Copy ¶
Copy the bitset into another bitset, returning the size of the destination bitset.
func (*Bitset32) Difference ¶
Bitset &^ (and or); difference between receiver and another set.
func (*Bitset32) Equal ¶
Test if two bitsets are equal. Returns true if both bitsets are the same size and all the same bits are set in both bitsets.
func (*Bitset32) Intersection ¶
Bitset & (and); intersection of receiver and another set.
func (*Bitset32) SymmetricDifference ¶
Bitset ^ (xor); symmetric difference of receiver and another set.
type Bitset64 ¶
type Bitset64 struct {
// contains filtered or unexported fields
}
func New64 ¶
Make a new bitset with a starting capacity of n bits. The bitset expands automatically.
func NewFromBytes64 ¶
NewFromBytes64 deserializes a byte slice into a Bitset64.
func (*Bitset64) CleanLastWord ¶
func (b *Bitset64) CleanLastWord()
CleanLastWord clean last word by setting unused bits to 0.
func (*Bitset64) Copy ¶
Copy the bitset into another bitset, returning the size of the destination bitset.
func (*Bitset64) Difference ¶
Bitset &^ (and or); difference between receiver and another set.
func (*Bitset64) Equal ¶
Test if two bitsets are equal. Returns true if both bitsets are the same size and all the same bits are set in both bitsets.
func (*Bitset64) Intersection ¶
Bitset & (and); intersection of receiver and another set.
func (*Bitset64) SymmetricDifference ¶
Bitset ^ (xor); symmetric difference of receiver and another set.