An open API service indexing awesome lists of open source software.

https://github.com/neka-nat/fastmunk

Python package for fast munkres algorithm
https://github.com/neka-nat/fastmunk

pyo3 python rust

Last synced: 5 months ago
JSON representation

Python package for fast munkres algorithm

Awesome Lists containing this project

README

          

# ![logo](https://raw.githubusercontent.com/neka-nat/fastmunk/master/assets/logo.png)

Python package for fast munkres algorithm.

# Installation

```sh
pip install fastmunk
```

## Getting started

```py
import fastmunk

mat = np.array([
[5, 9, 1],
[10, 3, 2],
[8, 7, 4],
], dtype=np.float64)

m = fastmunk.FastMunk()
indices = m.compute(mat)
```

## Benchmark
Compare with [munkres implemented in python](https://github.com/bmc/munkres).

```sh
cd examples
python benchmark.py
```

Output

```sh
FastMunk: 0.02310633659362793 [s]
Munkres: 0.5914878845214844 [s]
```