Return the count of overlapping items between this span and other span. For example: >>> Span([1, 2]).overlap(Span([5, 6])) 0 >>> Span([5, 6]).overlap(Span([5, 6])) 2 >>> Span([4, 5, 6, 7]).overlap(Span([5, 6])) 2 >>> Span([4,
(self, other)
| 310 | return len(self) / self.magnitude() |
| 311 | |
| 312 | def overlap(self, other): |
| 313 | """ |
| 314 | Return the count of overlapping items between this span and other span. |
| 315 | |
| 316 | For example: |
| 317 | >>> Span([1, 2]).overlap(Span([5, 6])) |
| 318 | 0 |
| 319 | >>> Span([5, 6]).overlap(Span([5, 6])) |
| 320 | 2 |
| 321 | >>> Span([4, 5, 6, 7]).overlap(Span([5, 6])) |
| 322 | 2 |
| 323 | >>> Span([4, 5, 6]).overlap(Span([5, 6, 7])) |
| 324 | 2 |
| 325 | >>> Span([4, 5, 6]).overlap(Span([6])) |
| 326 | 1 |
| 327 | >>> Span([4, 5]).overlap(Span([6, 7])) |
| 328 | 0 |
| 329 | """ |
| 330 | return len(self & other) |
| 331 | |
| 332 | def resemblance(self, other): |
| 333 | """ |
no outgoing calls
no test coverage detected