omnipy.util.range_lookup
Fast membership lookup for collections of non-negative integer ranges.
This module compacts a set of range objects into a bitarray-backed lookup
table for repeated containment checks.
| CLASS | DESCRIPTION |
|---|---|
RangeLookup |
Provide constant-time containment checks for integer ranges. |
RangeLookup
Provide constant-time containment checks for integer ranges.
| PARAMETER | DESCRIPTION |
|---|---|
ranges
|
Ranges to encode into the lookup table.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If any range contains negative values. |
| METHOD | DESCRIPTION |
|---|---|
__init__ |
|