Solves Minimum Cost Bipartite Matching Problems

Header library and R functions to solve minimum cost bipartite matching problem using Huhn-Munkres algorithm (Hungarian algorithm; < https://en.wikipedia.org/wiki/Hungarian_algorithm>; Kuhn (1955) ). This is a repackaging of code written by Cong Ma in the GitHub repo < https://github.com/mcximing/hungarian-algorithm-cpp>.


RcppHungarian

License CRAN

Header Library and R Functions to Solve Minimum Cost Bipartite Matching Problem using Huhn-Munkres algorithm (Hungarian algorithm; https://en.wikipedia.org/wiki/Hungarian_algorithm; Kuhn (1955) doi:10.1002/nav.3800020109).This is a repackaging of code written by Cong Ma in the GitHub repo https://github.com/mcximing/hungarian-algorithm-cpp.

Installation

You can install the released version of RcppHungarian from CRAN with:

install.packages("RcppHungarian")

Or the GitHub Version with:

devtools::install_github("jsilve24/RcppHungarian")

Example

A simple example, of the function usage below. Please see the Vignette for more detailed overview and examples.

library(RcppHungarian)
cost.of.matchings <- rbind(c(0,1,2,3),
                           c(4,2,1,0), 
                           c(9, 1, 0, 5))
HungarianSolver(cost.of.matchings)

#> $cost
#> [1] 0
#> 
#> $pairs
#>      [,1] [,2]
#> [1,]    1    1
#> [2,]    2    4
#> [3,]    3    3

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RcppHungarian")

0.3 by Justin Silverman, 3 years ago


https://github.com/jsilve24/RcppHungarian


Browse source code at https://github.com/cran/RcppHungarian


Authors: Justin Silverman [aut, cre] , Cong Ma [ctb, cph] , Markus Buehren [ctb, cph]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports Rcpp

Suggests testthat, knitr, rmarkdown, ggplot2

Linking to Rcpp


Imported by clustGLMM, harbinger, sentopics, seqHMM.

Suggested by tidyclust.


See at CRAN