bit

package
v0.0.0-...-03afc55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2015 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	BitSize int
	Length  int
	// contains filtered or unexported fields
}

func NewMap

func NewMap(l, size int) *Map

func NewMapFromRaw

func NewMapFromRaw(bits []uint64, size int) *Map

func (*Map) Get

func (m *Map) Get(i int) int

func (*Map) ResizeBits

func (m *Map) ResizeBits(size int) *Map

func (*Map) Set

func (m *Map) Set(i, val int)

type Set

type Set []uint64

Set is a collection of booleans stored as bits

func NewSet

func NewSet(size int) Set

NewSet allocates a new bit set that can store up to the passed number of bits.

func (Set) Get

func (s Set) Get(i int) bool

Get returns the value of the bit at the location

func (Set) Set

func (s Set) Set(i int, v bool)

Set changes the value of the bit at the location.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL