Documentation ¶
Overview ¶
Binary search tree
Implementation of Parallel K-Means++
Index ¶
- Constants
- func NewBtreeIndex(size int, space math.Space, options ...BtreeOption) *btreeIndex
- func NewHnswIndex(size int, space math.Space, options ...HnswOption) *hnswIndex
- func NewVoronoiIndex(size int, space math.Space, options ...VoronoiOption) *voronoiIndex
- type BtreeOption
- type HnswOption
- type Index
- type SearchResult
- type VoronoiOption
Constants ¶
View Source
const ( HnswSearchSimple hnswSearchAlgorithm = iota HnswSearchHeuristic )
Variables ¶
This section is empty.
Functions ¶
func NewBtreeIndex ¶
func NewBtreeIndex(size int, space math.Space, options ...BtreeOption) *btreeIndex
bTree index builds a forest of randomized binary search trees. Every node uniformly samples a pair of points and using a hyperplane equidistant to these two points splits space based on signed point plane distance. Once there is <= maxLeafItems in a node, it's considered to be a leaf node.
func NewHnswIndex ¶
func NewHnswIndex(size int, space math.Space, options ...HnswOption) *hnswIndex
func NewVoronoiIndex ¶
func NewVoronoiIndex(size int, space math.Space, options ...VoronoiOption) *voronoiIndex
Voronoi index builds a tree using kMeans algorithm. Every node of this tree (except leaf nodes) has number of children determined by splitFactor argument. Once there is <= maxCellItems in a node, it's considered to be a leaf node.
Types ¶
type BtreeOption ¶
type BtreeOption interface {
// contains filtered or unexported methods
}
func BtreeMaxLeafItems ¶
func BtreeMaxLeafItems(value int) BtreeOption
func BtreeNumTrees ¶
func BtreeNumTrees(value int) BtreeOption
type HnswOption ¶
type HnswOption interface {
// contains filtered or unexported methods
}
Options
func HnswEf ¶
func HnswEf(value int) HnswOption
func HnswEfConstruction ¶
func HnswEfConstruction(value int) HnswOption
func HnswLevelMultiplier ¶
func HnswLevelMultiplier(value float32) HnswOption
func HnswM ¶
func HnswM(value int) HnswOption
func HnswMmax ¶
func HnswMmax(value int) HnswOption
func HnswMmax0 ¶
func HnswMmax0(value int) HnswOption
func HnswSearchAlgorithm ¶
func HnswSearchAlgorithm(value hnswSearchAlgorithm) HnswOption
type Index ¶
type SearchResult ¶
type SearchResult []*pb.SearchResultItem
func (SearchResult) Len ¶
func (r SearchResult) Len() int
func (SearchResult) Less ¶
func (r SearchResult) Less(i, j int) bool
func (SearchResult) Swap ¶
func (r SearchResult) Swap(i, j int)
type VoronoiOption ¶
type VoronoiOption interface {
// contains filtered or unexported methods
}
func VoronoiMaxCellItems ¶
func VoronoiMaxCellItems(value int) VoronoiOption
func VoronoiSplitFactor ¶
func VoronoiSplitFactor(value int) VoronoiOption
Click to show internal directories.
Click to hide internal directories.