Add records a new element in the package set. It is the caller's responsibility to ensure that idx was created with the same PackageIndex as the PackageSet.
(idx IndexID)
| 92 | // It is the caller's responsibility to ensure that idx was created with the |
| 93 | // same PackageIndex as the PackageSet. |
| 94 | func (s *PackageSet) Add(idx IndexID) { |
| 95 | i := int(idx) |
| 96 | s.sparse[i/blockSize] |= 1 << (i % blockSize) |
| 97 | } |
| 98 | |
| 99 | // Union records all elements from other into the receiver, mutating the |
| 100 | // receiver set but not the argument set. The receiver must not be nil, but the |