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

Function block

join/Pexeso/block_and_verify.py:94–112  ·  view source on GitHub ↗
(Cq, Cr, Pairs, tao)

Source from the content-addressed store, hash-verified

92 return False
93
94def block(Cq, Cr, Pairs, tao):
95 for cq in Cq.child.values():
96 for cr in Cr.child.values():
97 if cq.is_leaf() and cr.is_leaf():
98 for i in range(len(cq.vector)):
99 if match5(cq.vector[i], cr, tao):
100 addPair(Pairs, cq.vector[i], cq.vec_ids[i], cq.emb[i], cr, "M")
101 else:
102 if not filter3(cq.vector[i], cr, tao):
103 addPair(Pairs, cq.vector[i], cq.vec_ids[i], cq.emb[i], cr, "C")
104 else:
105 if match6(cq, cr, tao):
106 clist = cr.get_leaf()
107 for g in cq.get_leaf():
108 for i in range(len(g.vector)):
109 addPairs(Pairs, g.vector[i], g.vec_ids[i], g.emb[i], clist, "M")
110 else:
111 if not filter4(cq, cr, tao):
112 block(cq, cr, Pairs, tao)
113
114def verify(Pairs, I, tao, T, index_embs, query_embs, index_sets, match_map, mismatch_map, time_threshold):
115 start = time.perf_counter()

Calls 8

match5Function · 0.85
addPairFunction · 0.85
filter3Function · 0.85
match6Function · 0.85
addPairsFunction · 0.85
filter4Function · 0.85
is_leafMethod · 0.80
get_leafMethod · 0.80

Tested by

no test coverage detected