lib

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparer added in v1.1.0

type Comparer[T any] interface {
	Compare(T) int
}

Return negative if less, positive if greater, 0 if equal

type DefaultComparer added in v1.1.0

type DefaultComparer[T constraints.Ordered] struct {
	Val T
}

func (DefaultComparer[T]) Compare added in v1.1.0

func (dc DefaultComparer[T]) Compare(other DefaultComparer[T]) int

type DefaultKeyable added in v1.1.0

type DefaultKeyable[T comparable] struct {
	Val T
}

func (DefaultKeyable[T]) Key added in v1.1.0

func (dk DefaultKeyable[T]) Key() T

type Keyable added in v1.1.0

type Keyable[K comparable] interface {
	Key() K
}

Directories

Path Synopsis
Package graph provides graph implementation Interface methods GetNodes, Add, AddBidirectional are the ways to interact with graph data structure.
Package graph provides graph implementation Interface methods GetNodes, Add, AddBidirectional are the ways to interact with graph data structure.
Package heap provides easy to use MinHeap and MaxHeap implementations https://en.wikipedia.org/wiki/Heap_(data_structure) Interface methods Insert, Extract, IsEmpty, Size are the ways to interact with heap data structure.
Package heap provides easy to use MinHeap and MaxHeap implementations https://en.wikipedia.org/wiki/Heap_(data_structure) Interface methods Insert, Extract, IsEmpty, Size are the ways to interact with heap data structure.
Package queue provides implementation for Queue data structure https://en.wikipedia.org/wiki/Queue_(abstract_data_type) Interface methods Enqueue,Dequeue, IsEmpty, Length are the ways to interact with queue data structure.
Package queue provides implementation for Queue data structure https://en.wikipedia.org/wiki/Queue_(abstract_data_type) Interface methods Enqueue,Dequeue, IsEmpty, Length are the ways to interact with queue data structure.
Package stack provides implementation for Stack data structure https://simple.wikipedia.org/wiki/Stack_(data_structure) Interface methods Push,Pop, Peek,IsEmpty,Size are the ways to interact with stack data structure.
Package stack provides implementation for Stack data structure https://simple.wikipedia.org/wiki/Stack_(data_structure) Interface methods Push,Pop, Peek,IsEmpty,Size are the ways to interact with stack data structure.

Jump to

Keyboard shortcuts

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