selector

package
v0.0.0-...-53ff736 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LEVEL_THRESHOLD
	// 在经过许多级别的递归之后,我们无论如何都会回到introselect,
	// 这是为了防止基数排序在有长的公共前缀时表现更差(可能是因为缓存位置)
	LEVEL_THRESHOLD = 8

	HISTOGRAM_SIZE = 257

	LENGTH_THRESHOLD = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IntroSelector

type IntroSelector interface {
	Swap(i, j int)

	// Compare entries found in slots i and j.
	// The contract for the returned value is the same as Comparator.compare(Object, Object).
	Compare(i, j int) int
}

type RadixSelector

type RadixSelector interface {
	Swap(i, j int)
	ByteAt(i, k int) int
}

type Selector

type Selector interface {
	SelectK(from, to, k int)
}

func NewIntroSelector

func NewIntroSelector(intro IntroSelector) Selector

func NewRadixSelector

func NewRadixSelector(radix RadixSelector, maxLength int) Selector

Jump to

Keyboard shortcuts

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