sort

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sort provides a mockable wrapper for sort.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) Float64s

func (*Impl) Float64s(x []float64)

func (*Impl) Float64sAreSorted

func (*Impl) Float64sAreSorted(x []float64) bool

func (*Impl) Ints

func (*Impl) Ints(x []int)

func (*Impl) IntsAreSorted

func (*Impl) IntsAreSorted(x []int) bool

func (*Impl) IsSorted

func (*Impl) IsSorted(data sort.Interface) bool

func (*Impl) Reverse

func (*Impl) Reverse(data sort.Interface) sort.Interface

func (*Impl) Search

func (*Impl) Search(n int, f func(int) bool) int

func (*Impl) SearchFloat64s

func (*Impl) SearchFloat64s(a []float64, x float64) int

func (*Impl) SearchInts

func (*Impl) SearchInts(a []int, x int) int

func (*Impl) SearchStrings

func (*Impl) SearchStrings(a []string, x string) int

func (*Impl) Slice

func (*Impl) Slice(x any, less func(i int, j int) bool)

func (*Impl) SliceIsSorted

func (*Impl) SliceIsSorted(x any, less func(i int, j int) bool) bool

func (*Impl) SliceStable

func (*Impl) SliceStable(x any, less func(i int, j int) bool)

func (*Impl) Sort

func (*Impl) Sort(data sort.Interface)

func (*Impl) Stable

func (*Impl) Stable(data sort.Interface)

func (*Impl) Strings

func (*Impl) Strings(x []string)

func (*Impl) StringsAreSorted

func (*Impl) StringsAreSorted(x []string) bool

type Interface

type Interface interface {
	Float64s(x []float64)
	Float64sAreSorted(x []float64) bool
	Ints(x []int)
	IntsAreSorted(x []int) bool
	IsSorted(data sort.Interface) bool
	Reverse(data sort.Interface) sort.Interface
	Search(n int, f func(int) bool) int
	SearchFloat64s(a []float64, x float64) int
	SearchInts(a []int, x int) int
	SearchStrings(a []string, x string) int
	Slice(x any, less func(i int, j int) bool)
	SliceIsSorted(x any, less func(i int, j int) bool) bool
	SliceStable(x any, less func(i int, j int) bool)
	Sort(data sort.Interface)
	Stable(data sort.Interface)
	Strings(x []string)
	StringsAreSorted(x []string) bool
}

Jump to

Keyboard shortcuts

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