MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / index

Method index

join/LSH/datasketch/lshensemble.py:137–153  ·  view source on GitHub ↗

给出一个集合的键、MinHashes和大小的索引。 Args: entries (`iterable` of `tuple`): 需要格式为 `(key, minhash, size)`, 其中key是一个集合的唯一标识符,minhash是该集合的MinHash,size是该集合的大小。 Note: size需要为正数

(self, entries)

Source from the content-addressed store, hash-verified

135 return partitions
136
137 def index(self, entries):
138 '''
139 给出一个集合的键、MinHashes和大小的索引。
140
141 Args:
142 entries (`iterable` of `tuple`): 需要格式为 `(key, minhash, size)`,
143 其中key是一个集合的唯一标识符,minhash是该集合的MinHash,size是该集合的大小。
144
145 Note:
146 size需要为正数
147 '''
148 # 将候选索引插入到对应分区
149 for curr_part, (lower, upper) in enumerate(zip(self.lowers, self.uppers)):
150 if entries[2] <= upper and entries[2] >= lower:
151 for r in self.indexes[curr_part]:
152 self.indexes[curr_part][r].insert(entries[0], entries[1])
153 break
154
155 def index_batch(self, entries):
156 ''&#x27;

Callers 13

minhash_multi_processFunction · 0.95
minhash_multi_processFunction · 0.95
minhash_multi_processFunction · 0.95
minhash_multi_processFunction · 0.95
minhash_multi_processFunction · 0.95
bootstrap_index_setsFunction · 0.95
minhash_multi_processFunction · 0.95
minhash_Lsh_forestFunction · 0.80
yago_entity_lshFunction · 0.80
minhash_Lsh_forestFunction · 0.80
minhash_Lsh_forestFunction · 0.80
regular_random_walkMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected