bitmask

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmask

type Bitmask struct {
	I map[uint64]uint64
	// contains filtered or unexported fields
}

Bitmask - simple bitmask data structire based on a map

func NewBitMask

func NewBitMask() *Bitmask

NewBitMask - constructor

func (*Bitmask) Empty

func (b *Bitmask) Empty() bool

Empty - return true if bitmask is entirely empty

func (*Bitmask) Has

func (b *Bitmask) Has(val int64) bool

Has - basic get/set methods

func (*Bitmask) Insert

func (b *Bitmask) Insert(val int64)

Insert - basic get/set methods

func (*Bitmask) Len

func (b *Bitmask) Len() uint64

Len - total elements in mask (non performant!)

type PBFMasks

type PBFMasks struct {
	Nodes       *Bitmask
	Ways        *Bitmask
	Relations   *Bitmask
	WayRefs     *Bitmask
	RelNodes    *Bitmask
	RelWays     *Bitmask
	RelRelation *Bitmask
}

PBFMasks - struct to hold common masks .

func NewPBFMasks

func NewPBFMasks() *PBFMasks

NewPBFMasks - constructor

func (PBFMasks) Print

func (m PBFMasks) Print()

Print -- print debug stats

func (*PBFMasks) ReadFrom

func (m *PBFMasks) ReadFrom(tap io.Reader) (int64, error)

ReadFrom - read from destination

func (*PBFMasks) ReadFromFile

func (m *PBFMasks) ReadFromFile(path string) error

ReadFromFile - read from disk

func (*PBFMasks) WriteTo

func (m *PBFMasks) WriteTo(sink io.Writer) (int64, error)

WriteTo - write to destination

func (*PBFMasks) WriteToFile

func (m *PBFMasks) WriteToFile(path string) error

WriteToFile - write to disk

Jump to

Keyboard shortcuts

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