Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kuhn-Munkres in Rust as a Ruby gem

This is a wrapper of https://github.com/mneumann/munkres-rs for Ruby.

Usage

Add to your Gemfile

gem 'munkres_ru'

Then you can do:

problem = [
  [1.0, 1.0, 1.0, 1.0, 1.0],
  [1.0, 1.0, 1.0, 1.0, 1.0],
  [1.0, 1.0, 1.0, 1.0, 1.0],
  [0.0, 0.0, 0.0, 0.0, 0.0],
  [0.0, 0.0, 0.0, 0.0, 0.0]
]
solution = MunkresRu.solve(problem)

# => [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]

Note: only square matrixes are handled.

Building

Install Rust and Cargo; then run

$ rake compile
$ rake spec

Build the Ruby gem with

$ rake build

About

Rust implementation of the Kuhn-Munkres algorithm in a Ruby gem

Topics

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages