hashset

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is a hashset implementation. The hashing function is Xxhash for its high performance

func New

func New() *Set

New creates a new Set

func (*Set) Add

func (s *Set) Add(data []byte) bool

Add an entry to the current set. If the entry is already there, it returns true

func (*Set) Has

func (s *Set) Has(data []byte) bool

Has returns true if the entry is found

func (*Set) Size

func (s *Set) Size() int

Size returns the number of elements in the Set

Jump to

Keyboard shortcuts

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