Learn R Programming

matchingR (version 1.1.1)

galeShapleyMatching: Compute the Gale-Shapley Algorithm

Description

This function provides an R wrapper for the C++ backend. Users should not call this function directly and instead use one2one, many2one, one2many.

Usage

galeShapleyMatching(proposerPref, reviewerUtils)

Arguments

proposerPref
is a matrix with the preference order of the proposing side of the market (using C++ indexing that starts at zero)
reviewerUtils
is a matrix with cardinal utilities of the courted side of the market

Value

  • A list with the successful proposals and engagements. proposals is a vector whose nth element contains the id of the reviewer that proposer n is matched to (using C++ indexing that starts at zero). engagements is a vector whose nth element contains the id of the proposer that reviewer n is matched to (using C++ indexing that starts at zero).