Documentation
¶
Index ¶
- func PartialSortSlice[TV interfaces.VectorType, TIX interfaces.IndexTypes](s interfaces.Pairs[TV, TIX], begin, middle, end int)
- func PartialSortSlice2[TV interfaces.VectorType, TIX interfaces.IndexTypes](s interfaces.Pairs[TV, TIX], begin, middle, end int)
- func SortPairs[TV interfaces.VectorType, TIX interfaces.IndexTypes](pairs []*interfaces.Pair[TV, TIX])
- func SortPairs2[TV interfaces.VectorType, TIX interfaces.IndexTypes](arr interfaces.Pairs[TV, TIX])
- func SortSlice[TIX interfaces.IndexTypes](slice []TIX)
- func SortSlice2[TIX interfaces.IndexTypes](slice []TIX)
- func SortSlice3[TIX interfaces.IndexTypes](slice []TIX)
- type PriorityQueue
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]
Click to show internal directories.
Click to hide internal directories.