Intersects returns a bool indicating if the supplied bitarray intersects this bitarray. This will check for intersection up to the length of the supplied bitarray. If the supplied bitarray is longer than this bitarray, this function returns false.
(other BitArray)
| 294 | // bitarray. If the supplied bitarray is longer than this bitarray, this |
| 295 | // function returns false. |
| 296 | func (ba *bitArray) Intersects(other BitArray) bool { |
| 297 | if other.Capacity() > ba.Capacity() { |
| 298 | return false |
| 299 | } |
| 300 | |
| 301 | if sba, ok := other.(*sparseBitArray); ok { |
| 302 | return ba.intersectsSparseBitArray(sba) |
| 303 | } |
| 304 | |
| 305 | return ba.intersectsDenseBitArray(other.(*bitArray)) |
| 306 | } |
| 307 | |
| 308 | // Blocks will return an iterator over this bit array. |
| 309 | func (ba *bitArray) Blocks() Iterator { |
nothing calls this directly
no test coverage detected