Documentation ¶
Overview ¶
Package search .
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinarySearch ¶
func BinarySearch(weightedIndexes SearchableSlice, selector uint64) int
BinarySearch 二分查找
Types ¶
type SearchableSlice ¶
type SearchableSlice interface { // GetValue 获取某个下标下面的值 GetValue(idx int) uint64 // Count 获取数组长度 Count() int }
SearchableSlice 可搜索的数组
Click to show internal directories.
Click to hide internal directories.