Discover Packages
github.com/zblach/go-bitset
package
module
Version:
v0.0.0-...-6a307ac
Opens a new window with list of versions in this module.
Published: Dec 8, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
bitset
This is a simple implementation of a bitset.
Expand ▾
Collapse ▴
Documentation
¶
type Binary[V Value , S Bitset [V]] interface {
And(b S) (aAndB S)
Or(b S) (aOrB S)
}
Binary are chainable binary operations over bitsets of the same type.
these functions are not expected to modify A or B, and S is also meant to conform to Binary[V, S Bitset[V]]
type Bitset[V Value ] interface {
Get(index V) bool
Set(indices ...V)
Unset(indices ...V)
Clear()
}
Basic functionality of a bitset implementation
Population count & size. TODO: move 'Pop' to Bitset proper?
type Size interface {
Len() int
Cap() int
}
Size-related inspection referring to the underlying bitset data storage
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.