Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type LSH ¶
type LSH struct {
Cfg *configs.LSHConfigs
Tables []*tables.Table // N tables each using a different randomly generated set of hyperplanes
Docs *forwardindex.InMemory // forward index which may be offloaded to a separate system
}
LSH represents the locality sensitive hash struct that stores the multiple tables containing the configured number of hyperplanes along with the documents currently indexed.
func New ¶
func New(cfg *configs.LSHConfigs) (*LSH, error)
New returns a new Locality Sensitive Hash struct ready for indexing and searching
func (*LSH) Index ¶
Index stores the document in the LSH data structure. Returns an error if the document is already present.
func (*LSH) Search ¶
Search looks through and merges results from all tables to find the nearest neighbors to the provided vector
func (*LSH) Stats ¶
func (l *LSH) Stats() *stats.Statistics
Stats returns the current statistics about the configured LSH struct.
Click to show internal directories.
Click to hide internal directories.