semvec/pypi-packages huggingface dataset:
mathInterval 0.5.3
Fast C++ interval math bindings
License: Apache-2.0
Requires Python: >=3.8

# mathInterval
[![PyPI](https://img.shields.io/pypi/v/mathInterval)](https://pypi.org/project/mathInterval/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![C++](https://img.shields.io/badge/C++-20-blue.svg)]()
[![Python](https://img.shields.io/badge/Python-3.8+-green.svg)]()

[🇷🇺 Читать на русском (на Github)](https://github.com/Fedorrracora/mathInterval/blob/main/README.ru.md)

C++ interval arithmetic exposed to Python.  
It can also be used directly in C++.

This module provides classes and algorithms for working
with mathematical intervals (multitudes). It supports:

- Construction of intervals with finite or infinite bounds.
- Smart search algorithms using user-provided lambdas.
- Conversion and custom transfer of interval data.
- Execution of arithmetic operators between intervals.

All classes and functions include Python-style docstrings,
which can be viewed via `help()` in a Python console.

In C++, each function is documented directly in the header
(`interval.h`) before its declaration.

## Installation

Note that the installation method for C++ will only put the library for C++,
method for Python - only for Python.

### C++

**Variant 1.**

Copy the `src/interval.h` file to your project and include it
using standard C++ mechanisms (`#include "interval.h"`).

**Variant 2.**

Run
```bash
git clone https://github.com/Fedorrracora/mathInterval --recurse-submodules
cd mathInterval
mkdir build && cd build
cmake ..
make
sudo make install
```

After that, the library will be fully installed in the system.

Now `#include <interval.h>` will work, and you won't have to copy the file into the project.

### Python

**Variant 1.**

Use standard pip package manager.
```bash
pip install mathInterval
```

**Variant 2.**

> ⚠️ Before building, make sure that the **build** module for `pip` is installed:
> ```bash
> pip install build
> ```

Run
```bash
git clone https://github.com/Fedorrracora/mathInterval --recurse-submodules
cd mathInterval
./load_stubgen.sh
python -m build
pip install dist/*.whl
```

## Usage

[You can view the full reference here (on GitHub)](https://github.com/Fedorrracora/mathInterval/blob/main/docs/reference.md)

## Uninstallation (Python)

```bash
pip uninstall mathInterval
```