Compute the optimizations to be done for light indexes.
(nblocks: int, optlevel: int)
| 228 | |
| 229 | |
| 230 | def col_light(nblocks: int, optlevel: int) -> tuple[bool, bool, bool, bool]: |
| 231 | """Compute the optimizations to be done for light indexes.""" |
| 232 | optmedian, optstarts, optstops, optfull = (False,) * 4 |
| 233 | |
| 234 | if 0 < optlevel <= 3: |
| 235 | optmedian = True |
| 236 | elif 3 < optlevel <= 6: |
| 237 | optmedian, optstarts = (True, True) |
| 238 | elif 6 < optlevel <= 9: |
| 239 | optmedian, optstarts, optstops = (True, True, True) |
| 240 | |
| 241 | return optmedian, optstarts, optstops, optfull |
| 242 | |
| 243 | |
| 244 | def col_medium(nblocks: int, optlevel: int) -> tuple[bool, bool, bool, bool]: |