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
- Host: GitHub
- URL: https://github.com/neka-nat/fastmunk
- Owner: neka-nat
- License: mit
- Created: 2022-09-20T22:52:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-29T01:37:51.000Z (about 3 years ago)
- Last Synced: 2025-03-24T05:45:24.835Z (10 months ago)
- Topics: pyo3, python, rust
- Language: Rust
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 
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]
```