ranking

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ranking owns exact bounded selection utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TopK

func TopK[T any](values []T, k int, better func(a, b T) bool) []T

TopK returns the first k values under better without mutating the input. Better must define a strict total order and return true when a ranks before b.

Types

This section is empty.

Jump to

Keyboard shortcuts

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