collections

package
v0.0.0-...-1bb50ad Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair[T any] Tuple[T, T]

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T any]() Queue[T]

func (Queue[T]) Front

func (q Queue[T]) Front() T

func (Queue[T]) Index

func (q Queue[T]) Index(index int) T

func (Queue[T]) Len

func (q Queue[T]) Len() int

func (*Queue[T]) MultPop

func (q *Queue[T]) MultPop(n int) []T

func (*Queue[T]) MultPush

func (q *Queue[T]) MultPush(elems ...T)

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() T

func (*Queue[T]) Push

func (q *Queue[T]) Push(elem T)

func (Queue[T]) Rear

func (q Queue[T]) Rear() T

func (Queue[T]) String

func (q Queue[T]) String() string

type Set

type Set[T comparable] struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet[T comparable]() Set[T]

func (*Set[T]) Add

func (s *Set[T]) Add(x T)

func (*Set[T]) Remove

func (s *Set[T]) Remove(x T)

func (Set[T]) Size

func (s Set[T]) Size() int

type Stack

type Stack[T any] struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack[T any]() Stack[T]

func (Stack[T]) Len

func (s Stack[T]) Len() int

func (*Stack[T]) MultPop

func (s *Stack[T]) MultPop(n int) []T

func (*Stack[T]) MultPush

func (s *Stack[T]) MultPush(elems ...T)

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() T

func (*Stack[T]) Push

func (s *Stack[T]) Push(elem T)

func (Stack[T]) String

func (s Stack[T]) String() string

func (Stack[T]) Top

func (s Stack[T]) Top() T

type Tuple

type Tuple[F, S any] struct {
	First  F
	Second S
}

func (Tuple[F, S]) Values

func (t Tuple[F, S]) Values() (F, S)

Jump to

Keyboard shortcuts

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