Documentation ¶ Index ¶ type Heap func New[T any](data []T, less func(a, b T) bool) *Heap[T] func (h *Heap[T]) Cap() int func (h *Heap[T]) DESCSort() func (h *Heap[T]) Len() int func (h *Heap[T]) Peek() T func (h *Heap[T]) Pop() T func (h *Heap[T]) PopLast() T func (h *Heap[T]) Push(x T) func (h *Heap[T]) Slice() []T func (h *Heap[T]) TryEvictPush(x T) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Heap ¶ type Heap[T any] struct { // contains filtered or unexported fields } func New ¶ func New[T any](data []T, less func(a, b T) bool) *Heap[T] func (*Heap[T]) Cap ¶ func (h *Heap[T]) Cap() int func (*Heap[T]) DESCSort ¶ func (h *Heap[T]) DESCSort() func (*Heap[T]) Len ¶ func (h *Heap[T]) Len() int func (*Heap[T]) Peek ¶ func (h *Heap[T]) Peek() T func (*Heap[T]) Pop ¶ func (h *Heap[T]) Pop() T func (*Heap[T]) PopLast ¶ func (h *Heap[T]) PopLast() T func (*Heap[T]) Push ¶ func (h *Heap[T]) Push(x T) func (*Heap[T]) Slice ¶ func (h *Heap[T]) Slice() []T func (*Heap[T]) TryEvictPush ¶ func (h *Heap[T]) TryEvictPush(x T) Source Files ¶ View all Source files heap.go Click to show internal directories. Click to hide internal directories.