sorted

package module
v0.0.0-...-6deb74b Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasSubset

func HasSubset[T constraints.Ordered](a, b []T) bool

HasSubset return true if b is a subset of a. a and b MUST BE sorted in ascending order.

Types

type Set

type Set[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T constraints.Ordered](v ...T) *Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(v ...T)

Add does not check for member uniqueness.

func (*Set[T]) Data

func (s *Set[T]) Data() []T

func (*Set[T]) HasSubset

func (a *Set[T]) HasSubset(b *Set[T]) bool

Jump to

Keyboard shortcuts

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