Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
type PriorityQueue ¶
A PriorityQueue implements heap.Interface and holds Items.
func (PriorityQueue[S, T]) Len ¶
func (pq PriorityQueue[S, T]) Len() int
func (PriorityQueue[S, T]) Less ¶
func (pq PriorityQueue[S, T]) Less(i, j int) bool
func (*PriorityQueue[S, T]) Pop ¶
func (pq *PriorityQueue[S, T]) Pop() any
func (*PriorityQueue[S, T]) Push ¶
func (pq *PriorityQueue[S, T]) Push(x any)
func (PriorityQueue[S, T]) Swap ¶
func (pq PriorityQueue[S, T]) Swap(i, j int)
type SortableMap ¶ added in v0.0.5
type SortableMap[S comparable, T Number] map[S]T
func NewSortableMap ¶ added in v0.0.5
func NewSortableMap[S comparable, T Number]() SortableMap[S, T]
func (SortableMap[S, T]) Top ¶ added in v0.0.5
func (m SortableMap[S, T]) Top(k int) SortableMap[S, T]
Click to show internal directories.
Click to hide internal directories.