sets

package module
v0.0.0-...-f18fb6c Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: JSON Imports: 1 Imported by: 35

README

== About ==

The Sets package provides implementations of hash-based Sets for all of Go's basic types. Currently there's no documentation but the extensive test suite Includes numerous examples of how to use slices to solve common tasks.

The package has its origins in research for the GoLightly virtual machine project. I hope you will find it useful.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASet

func ASet(v ...uintptr) (r aset)

func C128Set

func C128Set(v ...complex128) (r c128set)

func C64Set

func C64Set(v ...complex64) (r c64set)

func ESet

func ESet(v ...error) (r eset)

func F32Set

func F32Set(v ...float32) (r f32set)

func F64Set

func F64Set(v ...float64) (r f64set)

func I16Set

func I16Set(v ...int16) (r i16set)

func I32Set

func I32Set(v ...int32) (r i32set)

func I64Set

func I64Set(v ...int64) (r i64set)

func I8Set

func I8Set(v ...int8) (r i8set)

func ISet

func ISet(v ...int) (r iset)

func SSet

func SSet(v ...string) (r sset)

func SubsetOf

func SubsetOf(x, y Set) (r bool)

func U16Set

func U16Set(v ...uint16) (r u16set)

func U32Set

func U32Set(v ...uint32) (r u32set)

func U64Set

func U64Set(v ...uint64) (r u64set)

func U8Set

func U8Set(v ...uint8) (r u8set)

func USet

func USet(v ...uint) (r uset)

func VSet

func VSet(v ...interface{}) (r vset)

Types

type Equatable

type Equatable interface {
	Equal(interface{}) bool
}

type NumericSet

type NumericSet interface {
	Set
	Sum() interface{}
	Product() interface{}
}

type Set

type Set interface {
	Len() int
	Empty() Set
	Include(interface{})
	Member(interface{}) bool
	Each(interface{})
}

func Difference

func Difference(l, r Set) Set

func Intersection

func Intersection(l, r Set) Set

func Union

func Union(l, r Set) Set

Jump to

Keyboard shortcuts

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