LexisMinhash::LinearBucketTable
Inherits Reference < Object
LinearBucketTable is a simple open-addressing hash table with linear
probing. It stores BucketEntry values and is used by each LSH band to
record document ids for a given band hash.
Constructors
new(capacity : Int32)
Capacity should be ~2x expected entries for good performance
Create a table with capacity slots
Instance methods
find_candidates(key : UInt64, &) : Nil
Iterate candidate doc ids matching the given key by scanning the cluster.
insert(key : UInt64, doc_id : Int32) : Nil
Insert a key/doc_id pair into the table. No-op if the table is full or the pair already exists.