All Projects → johnridesabike → re-blossom

johnridesabike / re-blossom

Licence: MIT License
A Reason implementation of the blossom maximum-matching algorithm

Programming Languages

reason
219 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to re-blossom

bs-Zarith
Support Bigint, Q (rational numbers) and Z (integer numbers) in BuckleScript.
Stars: ✭ 15 (+0%)
Mutual labels:  reasonml
qnd
Quick and Dirty development builds
Stars: ✭ 19 (+26.67%)
Mutual labels:  reasonml
gow
URL shortener for evlfctry.pro
Stars: ✭ 29 (+93.33%)
Mutual labels:  reasonml
agda-mode-vscode
agda-mode on VS Code
Stars: ✭ 112 (+646.67%)
Mutual labels:  reasonml
bs-downshift
BuckleScript bindings for Downshift
Stars: ✭ 21 (+40%)
Mutual labels:  reasonml
reason-phoenix
ReasonML/ReScript bindings for the Phoenix javascript library
Stars: ✭ 14 (-6.67%)
Mutual labels:  reasonml
fuzzywuzzyR
fuzzy string matching in R
Stars: ✭ 32 (+113.33%)
Mutual labels:  matching
advent-2017
Advent of Code 2017
Stars: ✭ 16 (+6.67%)
Mutual labels:  reasonml
rebez
Cubic bezier implementation in Reason / OCaml.
Stars: ✭ 31 (+106.67%)
Mutual labels:  reasonml
ocaml-mqtt
MQTT client for OCaml/ReasonML
Stars: ✭ 14 (-6.67%)
Mutual labels:  reasonml
rescript-jest
ReScript bindings for Jest
Stars: ✭ 274 (+1726.67%)
Mutual labels:  reasonml
DeepCD
[ICCV17] DeepCD: Learning Deep Complementary Descriptors for Patch Representations
Stars: ✭ 39 (+160%)
Mutual labels:  matching
dokusho
Simple Japanese reading stats tracker
Stars: ✭ 12 (-20%)
Mutual labels:  reasonml
reason-catstagram
🐈 Catstagram made with ReasonReact!
Stars: ✭ 31 (+106.67%)
Mutual labels:  reasonml
timerlab
⏰ A simple and customizable timer
Stars: ✭ 94 (+526.67%)
Mutual labels:  reasonml
reactor
🚀 Native Actors for Reason and OCaml
Stars: ✭ 70 (+366.67%)
Mutual labels:  reasonml
bs-lwt
BuckleScript bindings for Lwt
Stars: ✭ 26 (+73.33%)
Mutual labels:  reasonml
reason-rt-binding-generator
Reason binding generator for react-toolbox
Stars: ✭ 18 (+20%)
Mutual labels:  reasonml
reasoncoin
No description or website provided.
Stars: ✭ 16 (+6.67%)
Mutual labels:  reasonml
dir-glob
Convert directories to glob compatible strings
Stars: ✭ 41 (+173.33%)
Mutual labels:  matching

Re-Blossom 🌺

GitHub package.json version Node.js CI GitHub

Re-Blossom is a Reason implementation of the famous blossom algorithm. It finds a maximum matching of vertices on general, undirected, weighted graphs.

📖 Read the documentation

Notice

If you're using ReScript, check out ReScript-Blossom. It's the same algorithm, but optimized for a JavaScript environment.

This package originally had similar optimizations, but I've reworked it to be more compatible with native-Reason. This package currently still relies on bs-platform to compile to JavaScript, but that's only for testing. All of the core modules should be native-compatible.

I'm not currently using this package in a native environment, so I haven't fully converted it yet. If you think you will find this useful, I encourage you to fork it and make the modifications you need.

Installation

Re-Blossom requires BuckleScript as a peer dependency, so you will have to install it separately. Add it by running:

npm install bs-platform -D

You can add Re-Blossom to your project by running:

npm install re-blossom

You will need to edit your project's bsconfig.json file and list Re-Blossom in the bs-dependencies.

{
  "bs-dependencies": [
    "re-blossom"
  ]
}

Development

Download the code:

git clone https://github.com/johnridesabike/re-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:

npm install

Compile a production build:

npm run build

Run the Reason watcher (not necessary if your IDE automatically compiles Reason):

npm run start

Run the tests:

npm run test

Run benchmarks that compare it to the similar JavaScript algorithm:

npm run bench

Run benchmarks in a browser:

npm run browser

Then open the URL provided and navigate to the __benchmarks__ directory.

To turn on debug logging, enable bs-log with the BS_LOG environmental variable:

BS_LOG=re-blossom=* npm run build

# or with your editor

BS_LOG=re-blossom=* vim

When reading the code, you may need familiarity with BuckleScript's uncurrying, as well as its map and set structures.

This code uses many terms and ideas from "Efficient algorithms for finding maximum matching in graphs" by Zvi Galil, ACM Computing Surveys, 1986. Reading the paper will make this code much more understandable.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].