MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / qdistance_to

Method qdistance_to

src/licensedcode/match.py:450–456  ·  view source on GitHub ↗

Return the absolute qspan distance to other match. Overlapping matches have a zero distance. Non-overlapping touching matches have a distance of one.

(self, other)

Source from the content-addressed store, hash-verified

448 return other.qspan in self.qspan
449
450 def qdistance_to(self, other):
451 """
452 Return the absolute qspan distance to other match.
453 Overlapping matches have a zero distance.
454 Non-overlapping touching matches have a distance of one.
455 """
456 return self.qspan.distance_to(other.qspan)
457
458 def idistance_to(self, other):
459 """

Callers 4

merge_matchesFunction · 0.80
filter_contained_matchesFunction · 0.80

Calls 1

distance_toMethod · 0.80

Tested by

no test coverage detected