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

Method idistance_to

src/licensedcode/match.py:458–464  ·  view source on GitHub ↗

Return the absolute ispan distance from self 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

456 return self.qspan.distance_to(other.qspan)
457
458 def idistance_to(self, other):
459 """
460 Return the absolute ispan distance from self to other match.
461 Overlapping matches have a zero distance.
462 Non-overlapping touching matches have a distance of one.
463 """
464 return self.ispan.distance_to(other.ispan)
465
466 def overlap(self, other):
467 """

Callers 1

merge_matchesFunction · 0.80

Calls 1

distance_toMethod · 0.80

Tested by

no test coverage detected