Versions in this module Expand all Collapse all v1 v1.1.0 Dec 27, 2018 Changes in this version + const HashValueSize + var NewLshForest = NewLshForest32 + func BytesToSig(data []byte) ([]uint64, error) + func Containment(q, x []uint64, qSize, xSize int) float64 + func Recs2Chan(recs []*DomainRecord) <-chan *DomainRecord + func SigToBytes(sig []uint64) []byte + type BySize []*DomainRecord + func (rs BySize) Len() int + func (rs BySize) Less(i, j int) bool + func (rs BySize) Subset(lower, upper int) []*DomainRecord + func (rs BySize) Swap(i, j int) + type DomainRecord struct + Key interface{} + Signature []uint64 + Size int + type Lsh interface + Add func(key interface{}, sig []uint64) + Index func() + OptimalKL func(x, q int, t float64) (optK, optL int, fp, fn float64) + Query func(sig []uint64, k, l int, out chan<- interface{}, done <-chan struct{}) + type LshEnsemble struct + Partitions []Partition + func BootstrapLshEnsembleEquiDepth(numPart, numHash, maxK, totalNumDomains int, ...) (*LshEnsemble, error) + func BootstrapLshEnsembleOptimal(numPart, numHash, maxK int, sortedDomainFactory func() <-chan *DomainRecord) (*LshEnsemble, error) + func BootstrapLshEnsemblePlusEquiDepth(numPart, numHash, maxK, totalNumDomains int, ...) (*LshEnsemble, error) + func BootstrapLshEnsemblePlusOptimal(numPart, numHash, maxK int, sortedDomainFactory func() <-chan *DomainRecord) (*LshEnsemble, error) + func NewLshEnsemble(parts []Partition, numHash, maxK int) *LshEnsemble + func NewLshEnsemblePlus(parts []Partition, numHash, maxK int) *LshEnsemble + func (e *LshEnsemble) Add(key interface{}, sig []uint64, partInd int) + func (e *LshEnsemble) Index() + func (e *LshEnsemble) Prepare(key interface{}, sig []uint64, size int) error + func (e *LshEnsemble) Query(sig []uint64, size int, threshold float64, done <-chan struct{}) <-chan interface{} + func (e *LshEnsemble) QueryTimed(sig []uint64, size int, threshold float64) (result []interface{}, dur time.Duration) + type LshForest struct + func NewLshForest16(k, l int) *LshForest + func NewLshForest32(k, l int) *LshForest + func NewLshForest64(k, l int) *LshForest + func (f *LshForest) Add(key interface{}, sig []uint64) + func (f *LshForest) Index() + func (f *LshForest) OptimalKL(x, q int, t float64) (optK, optL int, fp, fn float64) + func (f *LshForest) Query(sig []uint64, K, L int, out chan<- interface{}, done <-chan struct{}) + type LshForestArray struct + func NewLshForestArray(maxK, numHash int) *LshForestArray + func (a *LshForestArray) Add(key interface{}, sig []uint64) + func (a *LshForestArray) Index() + func (a *LshForestArray) OptimalKL(x, q int, t float64) (optK, optL int, fp, fn float64) + func (a *LshForestArray) Query(sig []uint64, K, L int, out chan<- interface{}, done <-chan struct{}) + type Minhash struct + func NewMinhash(seed int64, numHash int) *Minhash + func (m *Minhash) Push(b []byte) + func (m *Minhash) Signature() []uint64 + type Partition struct + Lower int + Upper int