sorter

package
v0.0.0-...-2833060 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comparator

type Comparator[T any] func(i, j *T) bool

Comparator should return if i is less than j.

type Sorter

type Sorter[T constraints.Ordered] interface {
	Sort([]T, Comparator[T])
}

Sorter is the interface that has to be implemented by sorting algorithms in this package.

type SorterAny

type SorterAny[T any] interface {
	SortAny([]T, Comparator[T])
}

SorterAny is the interface that has to be implemented by sorting algorithms in this package that want to sort any slice type.

Jump to

Keyboard shortcuts

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