> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Common.range manager

## RangeManager Objects

```python theme={"dark"}
class RangeManager()
```

Range Manager implemented using IntegerRangeSet for optimal performance.

This is a wrapper around IntegerRangeSet that provides the same API as RangeManager
but with improved performance characteristics.

#### add\_range

```python theme={"dark"}
def add_range(new_range: Range) -> None
```

Add a range, merging any overlapping ranges.

#### add\_ranges

```python theme={"dark"}
def add_ranges(new_ranges: Ranges) -> None
```

Add multiple ranges.

#### remove\_range

```python theme={"dark"}
def remove_range(range_to_remove: Range) -> None
```

Remove a specific range using IntegerRangeSet's native remove method.

#### remove\_ranges

```python theme={"dark"}
def remove_ranges(ranges_to_remove: Ranges) -> None
```

Remove multiple ranges.

#### clear\_ranges

```python theme={"dark"}
def clear_ranges() -> None
```

Clear all ranges.

#### get\_ranges

```python theme={"dark"}
def get_ranges() -> Ranges
```

Return the sorted list of merged ranges.

#### get\_ranges\_as\_frames

```python theme={"dark"}
def get_ranges_as_frames() -> Set[int]
```

Returns set of intersecting frames.

#### intersection

```python theme={"dark"}
def intersection(other_frame_class: Frames) -> Ranges
```

Returns list of intersecting ranges.
