sort2

package
v0.0.0-...-436d200 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteArrays

func ByteArrays(s [][]byte)

ByteArrays takes a slice of byte slices as a parameter and sorts it.

func Float32s

func Float32s(s []float32)

Float32s takes an float32 slice as a parameter and sorts it.

func Float64s

func Float64s(s []float64)

Float64s takes an float64 slice as a parameter and sorts it.

func Int16s

func Int16s(s []int16)

Int16s takes an int16 slice as a parameter and sorts it.

func Int32s

func Int32s(s []int32)

Int32s takes an int32 slice as a parameter and sorts it.

func Int64s

func Int64s(s []int64)

Int64s takes an int64 slice as a parameter and sorts it.

func Int8s

func Int8s(s []int8)

Int8s takes an int8 slice as a parameter and sorts it.

func Times

func Times(s []time.Time)

Times takes a slice of time elements as a parameter and sorts it.

func Uint16s

func Uint16s(s []uint16)

Uint16s takes a uint16 slice as a parameter and sorts it.

func Uint32s

func Uint32s(s []uint32)

Uint32s takes a uint32 slice as a parameter and sorts it.

func Uint64s

func Uint64s(s []uint64)

Uint64s takes a uint64 slice as a parameter and sorts it.

func Uint8s

func Uint8s(s []uint8)

Uint8s takes a uint16 slice as a parameter and sorts it.

func Uints

func Uints(s []uint)

Uints takes a uint slice as a parameter and sorts it.

Types

type ByteArraySlice

type ByteArraySlice [][]byte

ByteArraySlice represents a slice that holds byte arrays.

func (ByteArraySlice) Len

func (s ByteArraySlice) Len() int

Len returns the length of the ByteArraySlice instance.

func (ByteArraySlice) Less

func (s ByteArraySlice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the ByteArraySlice.

func (ByteArraySlice) Sort

func (s ByteArraySlice) Sort()

Sort sorts the elements within the ByteArraySlice.

func (ByteArraySlice) Swap

func (s ByteArraySlice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the ByteArraySlice.

type Float32Slice

type Float32Slice []float32

Float32Slice represents a slice that holds float32 elements.

func (Float32Slice) Len

func (s Float32Slice) Len() int

Len returns the length of the Float32Slice instance.

func (Float32Slice) Less

func (s Float32Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Float32Slice.

func (Float32Slice) Sort

func (s Float32Slice) Sort()

Sort sorts the elements within the Float32Slice.

func (Float32Slice) Swap

func (s Float32Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Float32Slice.

type Float64Slice

type Float64Slice []float64

Float64Slice represents a slice that holds float64 elements.

func (Float64Slice) Len

func (s Float64Slice) Len() int

Len returns the length of the Float64Slice instance.

func (Float64Slice) Less

func (s Float64Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Float64Slice.

func (Float64Slice) Sort

func (s Float64Slice) Sort()

Sort sorts the elements within the Float64Slice.

func (Float64Slice) Swap

func (s Float64Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Float64Slice.

type Int16Slice

type Int16Slice []int16

Int16Slice represents a slice that holds int16 elements.

func (Int16Slice) Len

func (s Int16Slice) Len() int

Len returns the length of the Int16Slice instance.

func (Int16Slice) Less

func (s Int16Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Int16Slice.

func (Int16Slice) Sort

func (s Int16Slice) Sort()

Sort sorts the elements within the Int16Slice.

func (Int16Slice) Swap

func (s Int16Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Int16Slice.

type Int32Slice

type Int32Slice []int32

Int32Slice represents a slice that holds int32 elements.

func (Int32Slice) Len

func (s Int32Slice) Len() int

Len returns the length of the Int32Slice instance.

func (Int32Slice) Less

func (s Int32Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Int32Slice.

func (Int32Slice) Sort

func (s Int32Slice) Sort()

Sort sorts the elements within the Int32Slice.

func (Int32Slice) Swap

func (s Int32Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Int32Slice

type Int64Slice

type Int64Slice []int64

Int64Slice represents a slice that holds int64 elements.

func (Int64Slice) Len

func (s Int64Slice) Len() int

Len returns the length of the Int64Slice instance.

func (Int64Slice) Less

func (s Int64Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Int64Slice.

func (Int64Slice) Sort

func (s Int64Slice) Sort()

Sort sorts the elements within the Int64Slice

func (Int64Slice) Swap

func (s Int64Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Int64Slice

type Int8Slice

type Int8Slice []int8

Int8Slice represents a slice that holds int8 elements.

func (Int8Slice) Len

func (s Int8Slice) Len() int

Len returns the length of the Int8Slice instance.

func (Int8Slice) Less

func (s Int8Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Int8Slice.

func (Int8Slice) Sort

func (s Int8Slice) Sort()

Sort sorts the elements within the Int8Slice.

func (Int8Slice) Swap

func (s Int8Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Int8Slice.

type TimeSlice

type TimeSlice []time.Time

TimeSlice represents a slice that holds elements of the type time.Time.

func (TimeSlice) Len

func (s TimeSlice) Len() int

Len returns the length of the TimeSlice instance.

func (TimeSlice) Less

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

Less reports whether the element with index i should sort before the element with index j in the TimeSlice.

func (TimeSlice) Sort

func (s TimeSlice) Sort()

Sort sorts the elements within the TimeSlice.

func (TimeSlice) Swap

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

Swap swaps the positions of the elements indices i and j of the TimeSlice.

type Uint16Slice

type Uint16Slice []uint16

Uint16Slice represents a slice that holds uint16 elements.

func (Uint16Slice) Len

func (s Uint16Slice) Len() int

Len returns the length of the Uint16Slice instance.

func (Uint16Slice) Less

func (s Uint16Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Uint16Slice.

func (Uint16Slice) Sort

func (s Uint16Slice) Sort()

Sort sorts the elements within the Uint16Slice.

func (Uint16Slice) Swap

func (s Uint16Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Uint16Slice.

type Uint32Slice

type Uint32Slice []uint32

Uint32Slice represents a slice that holds uint32 elements.

func (Uint32Slice) Len

func (s Uint32Slice) Len() int

Len returns the length of the Uint32Slice instance.

func (Uint32Slice) Less

func (s Uint32Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Uint32Slice.

func (Uint32Slice) Sort

func (s Uint32Slice) Sort()

Sort sorts the elements within the Uint32Slice.

func (Uint32Slice) Swap

func (s Uint32Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Uint32Slice.

type Uint64Slice

type Uint64Slice []uint64

Uint64Slice represents a slice that holds uint64 elements.

func (Uint64Slice) Len

func (s Uint64Slice) Len() int

Len returns the length of the Uint64Slice instance.

func (Uint64Slice) Less

func (s Uint64Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Uint64Slice.

func (Uint64Slice) Sort

func (s Uint64Slice) Sort()

Sort sorts the elements within the Uint64Slice.

func (Uint64Slice) Swap

func (s Uint64Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Uint64Slice.

type Uint8Slice

type Uint8Slice []uint8

Uint8Slice represents a slice that holds uint8 elements.

func (Uint8Slice) Len

func (s Uint8Slice) Len() int

Len returns the length of the Uint8Slice instance.

func (Uint8Slice) Less

func (s Uint8Slice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the Uint8Slice.

func (Uint8Slice) Sort

func (s Uint8Slice) Sort()

Sort sorts the elements within the Uint8Slice

func (Uint8Slice) Swap

func (s Uint8Slice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the Uint8Slice

type UintSlice

type UintSlice []uint

UintSlice represents a slice that holds uint elements.

func (UintSlice) Len

func (s UintSlice) Len() int

Len returns the length of the UintSlice instance.

func (UintSlice) Less

func (s UintSlice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j in the UintSlice.

func (UintSlice) Sort

func (s UintSlice) Sort()

Sort sorts the elements within the UintSlice.

func (UintSlice) Swap

func (s UintSlice) Swap(i, j int)

Swap swaps the positions of the elements indices i and j of the UintSlice.

Jump to

Keyboard shortcuts

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