package
Version:
v0.0.0-...-1ec2636
Opens a new window with list of versions in this module.
Published: Jan 4, 2019
License: GPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func TopN(candidates []interface{}, less Less, n int) []interface{}
找出最大的TopN个值
type GenHeap struct {
Data []interface{}
}
func (h *GenHeap) Pop() interface{}
func (h *GenHeap) Push(x interface{})
type Less func(small interface{}, big interface{}) bool
Less 是需要实现的比较函数
Source Files
¶
Click to show internal directories.
Click to hide internal directories.