Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnridesabike/rescript-blossom
A ReScript implementation of the blossom maximum-matching algorithm.
https://github.com/johnridesabike/rescript-blossom
blossom blossom-algorithm matching maximum-matching rescript
Last synced: 18 days ago
JSON representation
A ReScript implementation of the blossom maximum-matching algorithm.
- Host: GitHub
- URL: https://github.com/johnridesabike/rescript-blossom
- Owner: johnridesabike
- License: mpl-2.0
- Created: 2021-03-15T16:41:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T00:44:10.000Z (18 days ago)
- Last Synced: 2024-12-18T00:46:25.368Z (18 days ago)
- Topics: blossom, blossom-algorithm, matching, maximum-matching, rescript
- Language: ReScript
- Homepage: https://johnridesa.bike/rescript-blossom/
- Size: 518 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ReScript-Blossom 🌺
![GitHub package.json version](https://img.shields.io/github/package-json/v/johnridesabike/rescript-blossom)
![Node.js CI](https://github.com/johnridesabike/rescript-blossom/workflows/Node.js%20CI/badge.svg)
![GitHub](https://img.shields.io/github/license/johnridesabike/rescript-blossom)ReScript-Blossom is a [ReScript](https://rescript-lang.org/) implementation of the
famous [blossom algorithm](https://en.wikipedia.org/wiki/Blossom_algorithm). It
finds a maximum matching of vertices on general, undirected, weighted graphs.**[📖 Read the documentation](https://johnridesa.bike/rescript-blossom/)**
## Installation
You can add ReScript-Blossom to your project by running:
```sh
npm install rescript-blossom
```You will need to edit your project's `rescript.json` file and list
ReScript-Blossom in the `bs-dependencies`.```json
{
"bs-dependencies": ["rescript-blossom"]
}
```## Development
Download the code:
```sh
git clone https://github.com/johnridesabike/rescript-blossom.git
```If you want to make your own changes, then it's recommended to fork the
repository on GitHub and clone your forked version.Install the dependencies:
```sh
npm install
```Compile a production build:
```sh
npm run build
```Run the ReScript watcher.
```sh
npm run start
```Run the tests:
```sh
npm run test
```Run benchmarks that compare it to the similar JavaScript algorithm:
```sh
npm run bench
```Run benchmarks in a browser:
```sh
npm run browser
```Then open the URL provided and navigate to the `__benchmarks__` directory.
This code uses many terms and ideas from
["Efficient algorithms for finding maximum matching in graphs" by Zvi Galil, _ACM Computing Surveys_, 1986](https://doi.org/10.1145/6462.6502).
Reading the paper will make this code much more understandable.