MCPcopy Create free account
hub / github.com/ActiveState/code / find

Method find

recipes/Python/572156_BKtree/recipe-572156.py:199–204  ·  view source on GitHub ↗

Return an array with all the items found with distance <= threshold from item.

(self, item, threshold)

Source from the content-addressed store, hash-verified

197 self.nodes[root].append((item, dist))
198
199 def find(self, item, threshold):
200 "Return an array with all the items found with distance <= threshold from item."
201 result = []
202 if self.nodes:
203 self._finder(self.root, item, threshold, result)
204 return result
205
206 def _finder(self, root, item, threshold, result):
207 dist = self.distance(root, item)

Callers 15

combineFunctionsMethod · 0.45
__sanitizeMethod · 0.45
__getUseMethod · 0.45
__editorMethod · 0.45
searchMethod · 0.45
contains_wordFunction · 0.45
coordinateFunction · 0.45
fetchFunction · 0.45
nonblocking_readlinesFunction · 0.45
getMethod · 0.45
watchFunction · 0.45
name_generatorFunction · 0.45

Calls 1

_finderMethod · 0.95

Tested by

no test coverage detected