Documentation ¶
Overview ¶
Package boolmap creates a map of bools using bytes for efficiency (needs benchmarking for memory)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrumbMap ¶
CrumbMap is a map of Crumbs (2-bits, values 0, 1, 2, 3)
type CrumbSlice ¶
type CrumbSlice []byte
CrumbSlice is a slice of bytes, representing crumbs (2-bits)
func NewCrumbSlice ¶
func NewCrumbSlice() *CrumbSlice
NewCrumbSlice returns a new, initialised, CrumbSlice
func NewCrumbSliceSize ¶
func NewCrumbSliceSize(size uint) *CrumbSlice
NewCrumbSliceSize returns a new Crumbslice, initialised to the given size
func (CrumbSlice) Get ¶
func (c CrumbSlice) Get(p uint) byte
Get returns a crumb from the given position
func (*CrumbSlice) Set ¶
func (c *CrumbSlice) Set(p uint, d byte)
Set sets the crumb at the given position
type Map ¶
Map is the default boolmap
type NibbleMap ¶
NibbleMap is a map of Nibbles (4-bits, values 0-15)
type NibbleSlice ¶
type NibbleSlice []byte
NibbleSlice is a slice of bytes representing nibbles (4-bits)
func NewNibbleSlice ¶
func NewNibbleSlice() NibbleSlice
NewNibbleSlice returns a new, initialised, CrumbSlice
func NewNibbleSliceSize ¶
func NewNibbleSliceSize(size uint) NibbleSlice
NewNibbleSliceSize returns a new NibbleSlice, initialised to the given size
func (NibbleSlice) Get ¶
func (n NibbleSlice) Get(p uint) byte
Get returns a crumb from the given position
func (*NibbleSlice) Set ¶
func (n *NibbleSlice) Set(p uint, d byte)
Set sets the crumb at the given position
type Slice ¶
type Slice []byte
Slice is a slice of bytes representing bools
func NewSliceSize ¶
NewSliceSize returns a new Slice, intitialised to the size given