sort

package
v0.0.0-...-e6a8dbb Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PartialSortSlice

func PartialSortSlice[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	s interfaces.Pairs[TV, TIX],
	begin, middle, end int,
)

func PartialSortSlice2

func PartialSortSlice2[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	s interfaces.Pairs[TV, TIX],
	begin, middle, end int,
)

func SortPairs

func SortPairs[TV interfaces.VectorType, TIX interfaces.IndexTypes](
	pairs []*interfaces.Pair[TV, TIX],
)

func SortPairs2

func SortPairs2[TV interfaces.VectorType, TIX interfaces.IndexTypes](arr interfaces.Pairs[TV, TIX])

func SortSlice

func SortSlice[TIX interfaces.IndexTypes](slice []TIX)

func SortSlice2

func SortSlice2[TIX interfaces.IndexTypes](slice []TIX)

func SortSlice3

func SortSlice3[TIX interfaces.IndexTypes](slice []TIX)

Types

type PriorityQueue

type PriorityQueue[T constraints.Ordered, S constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func NewPriorityQueue

func NewPriorityQueue[T constraints.Ordered, S constraints.Ordered]() *PriorityQueue[T, S]

func (*PriorityQueue[_, _]) Empty

func (pq *PriorityQueue[_, _]) Empty() bool

func (*PriorityQueue[_, _]) Len

func (pq *PriorityQueue[_, _]) Len() int

func (*PriorityQueue[T, S]) Pop

func (pq *PriorityQueue[T, S]) Pop() *interfaces.Pair[T, S]

func (*PriorityQueue[T, S]) Push

func (pq *PriorityQueue[T, S]) Push(first T, second S)

func (*PriorityQueue[T, S]) Top

func (pq *PriorityQueue[T, S]) Top() *interfaces.Pair[T, S]

Jump to

Keyboard shortcuts

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