top_k library

Functions

topK<T extends Comparable>(Iterable<T> inputs, int k, {bool desc: false}) List<T>
Returns the smallest k elements from inputs. desc controls whether elements are smallest (desc = false) or largest (desc = true)