Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ANNer ¶
type ANNer interface { // ANN takes a query point and how many nearest neighbors to return // and returns the indices of the neihgbors ANN(q []float64, k int) []int }
ANNer allows you to perform an approximate k-NN search given a query point
func NewExhaustiveNNer ¶
NewExhaustiveNNer creates a new ANNer that uses exhaustive search Obviously you should use this for all your performance sensitive tasks
func NewMRPTANNer ¶
NewMRPTANNer creates a NN index using random projection trees See https://arxiv.org/pdf/1509.06957.pdf for additional details t -> number of trees, l -> depth of tree
type MappedANNer ¶
MappedANNer is an ANNer that will return the string values associated with the k nearest neighbors instead of their indices
func NewMappedANNer ¶
func NewMappedANNer(nn ANNer, mapping []string) MappedANNer
NewMappedANNer creates a new MappedANNer given an existing ANNer and a mapping from indices to a series of string values
Click to show internal directories.
Click to hide internal directories.