Metadata-Version: 2.1
Name: ranged_heap
Version: 0.1.0
Summary: RangedHeap data structure
Home-page: https://github.com/giuseppeambrosio97/ranged-heap
License: Apache-2.0
Keywords: datastructure,heap,greedy-algorithm
Author: Giuseppe Ambrosio
Author-email: giuambro97@gmail.com
Maintainer: Giuseppe Ambrosio
Maintainer-email: giuambro97@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/giuseppeambrosio97/ranged-heap
Description-Content-Type: text/markdown

# RangedHeap

Welcome to the RangedHeap documentation! This documentation provides an overview of the RangedHeap data structure, its methods, and examples of its usage.

For more details, please refer to the [documentation](https://giuseppeambrosio97.github.io/ranged-heap/).

## What is RangedHeap?

RangedHeap is a data structure designed to manage a collection of choices associated with integer values within a specified range [0, k]. It supports efficient operations for adding, deleting, and retrieving choices based on their integer values.

## Features

- **Efficient Choice Management**: Manage choices efficiently within a specified integer range.
- **Dynamic Updates**: Support dynamic updates to the heap as choices change.
- **Optimized Retrieval**: Quickly retrieve the best choice based on specified criteria (minimum or maximum).

## How to Use

The RangedHeap is particularly useful for implementing algorithms that require optimal selection from a set of integer-ranged choices, such as greedy algorithms.

### Example Usage

```python
import ranged_heap as rh

choices = [(1, 4), (2, 3), (3, 5), (0, 6), (5, 7), (8, 9)]
k = max(end for _, end in choices)
ranged_heap = rh.RangedHeap(k, choices)
```

