sort

package
v1.2.117 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPartialSorted added in v1.2.74

func IsPartialSorted(data sort.Interface, k int) bool

IsPartialSorted reports whether data[:k] is partial sorted, as top k of data[:].

Types

type TimeDurationSlice

type TimeDurationSlice []time.Duration

TimeDurationSlice attaches the methods of Interface to []time.Duration, sorting in increasing order.

func (TimeDurationSlice) Len

func (x TimeDurationSlice) Len() int

func (TimeDurationSlice) Less

func (x TimeDurationSlice) Less(i, j int) bool

func (TimeDurationSlice) Sort

func (x TimeDurationSlice) Sort()

Sort is a convenience method: x.Sort() calls Sort(x).

func (TimeDurationSlice) Swap

func (x TimeDurationSlice) Swap(i, j int)

type TimeSlice

type TimeSlice []time.Time

TimeSlice attaches the methods of Interface to []time.Time, sorting in increasing order.

func (TimeSlice) Len

func (x TimeSlice) Len() int

func (TimeSlice) Less

func (x TimeSlice) Less(i, j int) bool

func (TimeSlice) Sort

func (x TimeSlice) Sort()

Sort is a convenience method: x.Sort() calls Sort(x).

func (TimeSlice) Swap

func (x TimeSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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