Documentation ¶
Index ¶
- func BytesToInts(bys []byte) []int
- func CalcDist(set1, set2 mapset.Set) float32
- func DeleteSlice(list []string, ele string) []string
- func FloatsToBytes(n []float64) []byte
- func GenSet(s []string) mapset.Set
- func IntsToBytes(n []int) []byte
- func ListAdd(db *leveldb.DB, key []byte, item string) error
- func ListDelete(db *leveldb.DB, key []byte, item string) error
- func ListExist(list []string, item string) bool
- func PointInfo(point Point, k int) string
- func StringIn(strings string) []byte
- func StringListToBytesList(strlist []string) [][]byte
- func StringOut(bye []byte) string
- type Item
- type ItemList
- type LshForest
- type Minhash
- type Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToInts ¶
func DeleteSlice ¶
func FloatsToBytes ¶
func IntsToBytes ¶
func StringListToBytesList ¶
Types ¶
type LshForest ¶
type LshForest struct {
// contains filtered or unexported fields
}
LshForest implements the LSH Forest algorithm by Mayank Bawa et.al. It supports both nearest neighbour candidate query and k-NN query.
func NewLshForest ¶
NewLshForest creates a new LSH Forest for L2 distance. dim is the diminsionality of the data, l is the number of hash tables to use, m is the number of hash values to concatenate to form the key to the hash tables, w is the slot size for the family of LSH functions.
type Minhash ¶
type Minhash struct {
// contains filtered or unexported fields
}
Minhash represents a MinHash object
func NewMinhash ¶
NewMinhash initialize a MinHash object with a seed and the number of hash functions.
func (*Minhash) Merge ¶
Merge combines the signature of the other Minhash with this one, making this one carry the signature of the union.
Click to show internal directories.
Click to hide internal directories.