set

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

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set map[string]bool

Set implements a simple hash set for strings. The value is true, if the key exists. For a consistent behavior, do not explicitly set the value to false for a missing key.

func New

func New(v ...string) Set

func (Set) Add

func (s Set) Add(v ...string)

func (Set) AddSet

func (s Set) AddSet(other Set)

func (Set) Contains

func (s Set) Contains(a string) bool

func (Set) Copy

func (s Set) Copy() Set

Copy returns a copy of the set.

func (Set) Empty

func (s Set) Empty() bool

func (Set) Get

func (s Set) Get() (string, bool)

func (Set) Intersection

func (s Set) Intersection(other Set) int

func (Set) Jaccard

func (s Set) Jaccard(other Set) float64

func (Set) Remove

func (s Set) Remove(a string) bool

func (Set) Size

func (s Set) Size() int

func (Set) Slice

func (s Set) Slice() []string

func (Set) String

func (s Set) String() string

func (Set) Union

func (s Set) Union(other Set) int

Jump to

Keyboard shortcuts

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