Documentation ¶ Index ¶ type Heap func NewHeap[T any, V Interface[T]](arr V) Heap[T, V] func (heap Heap[T, V]) First() T func (heap Heap[T, V]) Init() func (heap Heap[T, V]) Last() T func (heap *Heap[T, V]) Pop() T func (heap *Heap[T, V]) Push(x T) func (heap *Heap[T, V]) Put(val T) func (heap *Heap[T, V]) Remove(i int) T type Interface Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Heap ¶ type Heap[T any, V Interface[T]] []T func NewHeap ¶ func NewHeap[T any, V Interface[T]](arr V) Heap[T, V] func (Heap[T, V]) First ¶ func (heap Heap[T, V]) First() T func (Heap[T, V]) Init ¶ func (heap Heap[T, V]) Init() func (Heap[T, V]) Last ¶ func (heap Heap[T, V]) Last() T func (*Heap[T, V]) Pop ¶ func (heap *Heap[T, V]) Pop() T func (*Heap[T, V]) Push ¶ func (heap *Heap[T, V]) Push(x T) func (*Heap[T, V]) Put ¶ added in v1.8.0 func (heap *Heap[T, V]) Put(val T) func (*Heap[T, V]) Remove ¶ func (heap *Heap[T, V]) Remove(i int) T type Interface ¶ type Interface[T any] interface { ~[]T Less(i, j int) bool } Source Files ¶ View all Source files heap.go Directories ¶ Show internal Expand all Path Synopsis cmp cmpkey cmpless lessfunc Click to show internal directories. Click to hide internal directories.