| @@ 66-72 (lines=7) @@ | ||
| 63 | /** |
|
| 64 | * @param int $i |
|
| 65 | */ |
|
| 66 | public function setBit(int $i) |
|
| 67 | { |
|
| 68 | $offset = \intdiv($i, self::BITS); |
|
| 69 | $char = $this->str[$offset]; |
|
| 70 | $char |= self::MASKS[$i % self::BITS]; |
|
| 71 | $this->str[$offset] = $char; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @param int $i |
|
| @@ 77-83 (lines=7) @@ | ||
| 74 | /** |
|
| 75 | * @param int $i |
|
| 76 | */ |
|
| 77 | public function clearBit(int $i) |
|
| 78 | { |
|
| 79 | $offset = \intdiv($i, self::BITS); |
|
| 80 | $char = $this->str[$offset]; |
|
| 81 | $char &= ~self::MASKS[$i % self::BITS]; |
|
| 82 | $this->str[$offset] = $char; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @param BitSet $other |
|