cpp_wrapper_galeshapley {matchingR}R Documentation

C++ wrapper for Gale-Shapley Algorithm

Description

This function provides an R wrapper for the C++ backend. Users should not call this function directly and instead use galeShapley.marriageMarket or galeShapley.collegeAdmissions.

Usage

cpp_wrapper_galeshapley(proposerPref, reviewerUtils)

Arguments

proposerPref

is a matrix with the preference order of the proposing side of the market. If there are n proposers and m reviewers in the market, then this matrix will be of dimension m by n. The i,jth element refers to j's ith most favorite partner. Preference orders must be complete and specified using C++ indexing (starting at 0).

reviewerUtils

is a matrix with cardinal utilities of the courted side of the market. If there are n proposers and m reviewers, then this matrix will be of dimension n by m. The i,jth element refers to the payoff that individual j receives from being matched to individual i.

Value

A list with elements that specify who is matched to whom. Suppose there are n proposers and m reviewers. The list contains the following items:


[Package matchingR version 1.3.3 Index]