Package: matchingR 1.3.3

matchingR: Matching Algorithms in R and C++

Computes matching algorithms quickly using Rcpp. Implements the Gale-Shapley Algorithm to compute the stable matching for two-sided markets, such as the stable marriage problem and the college-admissions problem. Implements Irving's Algorithm for the stable roommate problem. Implements the top trading cycle algorithm for the indivisible goods trading problem.

Authors:Jan Tilly, Nick Janetos

matchingR_1.3.3.tar.gz
matchingR_1.3.3.zip(r-4.5)matchingR_1.3.3.zip(r-4.4)matchingR_1.3.3.zip(r-4.3)
matchingR_1.3.3.tgz(r-4.5-x86_64)matchingR_1.3.3.tgz(r-4.5-arm64)matchingR_1.3.3.tgz(r-4.4-x86_64)matchingR_1.3.3.tgz(r-4.4-arm64)matchingR_1.3.3.tgz(r-4.3-x86_64)matchingR_1.3.3.tgz(r-4.3-arm64)
matchingR_1.3.3.tar.gz(r-4.5-noble)matchingR_1.3.3.tar.gz(r-4.4-noble)
matchingR_1.3.3.tgz(r-4.4-emscripten)matchingR_1.3.3.tgz(r-4.3-emscripten)
matchingR.pdf |matchingR.html
matchingR/json (API)
NEWS

# Install 'matchingR' in R:
install.packages('matchingR', repos = c('https://jtilly.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jtilly/matchingr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

7.09 score 50 stars 2 packages 41 scripts 387 downloads 18 exports 2 dependencies

Last updated 6 months agofrom:32770b6f4f. Checks:1 OK, 10 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 28 2025
R-4.5-win-x86_64NOTEFeb 28 2025
R-4.5-mac-x86_64NOTEFeb 28 2025
R-4.5-mac-aarch64NOTEFeb 28 2025
R-4.5-linux-x86_64NOTEFeb 28 2025
R-4.4-win-x86_64NOTEFeb 28 2025
R-4.4-mac-x86_64NOTEFeb 28 2025
R-4.4-mac-aarch64NOTEFeb 28 2025
R-4.3-win-x86_64NOTEFeb 28 2025
R-4.3-mac-x86_64NOTEFeb 28 2025
R-4.3-mac-aarch64NOTEFeb 28 2025

Exports:cpp_wrapper_galeshapleycpp_wrapper_galeshapley_check_stabilitycpp_wrapper_ttccpp_wrapper_ttc_check_stabilitygaleShapley.checkPreferencesgaleShapley.checkStabilitygaleShapley.collegeAdmissionsgaleShapley.marriageMarketgaleShapley.validaterankIndexroommateroommate.checkPreferencesroommate.checkStabilityroommate.validatesortIndexsortIndexOneSidedtoptradingtoptrading.checkStability

Dependencies:RcppRcppArmadillo

Matching Algorithms in R and C++: An Introduction to matchingR

Rendered frommatchingR-intro.Rmdusingknitr::rmarkdownon Feb 28 2025.

Last update: 2024-09-19
Started: 2015-05-18

Readme and manuals

Help Manual

Help pageTopics
matchingR: Matching Algorithms in R and C++matchingR-package matchingR
C++ wrapper for Gale-Shapley Algorithmcpp_wrapper_galeshapley
C++ Wrapper to Check Stability of Two-sided Matchingcpp_wrapper_galeshapley_check_stability
Computes a stable roommate matchingcpp_wrapper_irving
Check if a matching solves the stable roommate problemcpp_wrapper_irving_check_stability
Computes the top trading cycle algorithmcpp_wrapper_ttc
Check if a one-sided matching for the top trading cycle algorithm is stablecpp_wrapper_ttc_check_stability
Check if preference order is completegaleShapley.checkPreferences
Check if a two-sided matching is stablegaleShapley.checkStability
Gale-Shapley Algorithm: College Admissions ProblemgaleShapley.collegeAdmissions
Gale-Shapley Algorithm: Stable Marriage ProblemgaleShapley galeShapley.marriageMarket
Input validation of preferencesgaleShapley.validate
Deprecated Functions in matchingRcheckPreferenceOrder checkPreferenceOrderOnesided checkStability checkStabilityRoommate checkStabilityTopTradingCycle galeShapleyMatching many2one matchingR-deprecated one2many one2one onesided stableRoommateMatching topTradingCycle validateInputs validateInputsOneSided
Rank elements within column of a matrixrankIndex
Repeat each column of a matrix n timesrepcol
Repeat each row of a matrix n timesreprow
Compute matching for one-sided marketsroommate
Check if preference order for a one-sided market is completeroommate.checkPreferences
Check if a roommate matching is stableroommate.checkStability
Input validation for one-sided marketsroommate.validate
Sort indices of a matrix within a columnsortIndex
Ranks elements with column of a matrix, assuming a one-sided market.sortIndexOneSided
Compute the top trading cycle algorithmtoptrading
Check if there are any pairs of agents who would rather swap houses with each other rather than be with their own two current respective partners.toptrading.checkStability