search

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 0 Imported by: 0

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 可搜索的数组

Jump to

Keyboard shortcuts

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