cpp_wrapper_galeshapley_check_stability {matchingR} | R Documentation |
C++ Wrapper to Check Stability of Two-sided Matching
Description
This function checks if a given matching is stable for a particular set of
preferences. This function provides an R wrapper for the C++ backend. Users
should not call this function directly and instead use
galeShapley.checkStability
.
Usage
cpp_wrapper_galeshapley_check_stability(
proposerUtils,
reviewerUtils,
proposals,
engagements
)
Arguments
proposerUtils |
is a matrix with cardinal utilities of the proposing
side of the market. If there are |
reviewerUtils |
is a matrix with cardinal utilities of the courted side
of the market. If there are |
proposals |
is a matrix that contains the number of the reviewer that a given proposer is matched to: the first row contains the number of the reviewer that is matched with the first proposer (using C++ indexing), the second row contains the id of the reviewer that is matched with the second proposer, etc. The column dimension accommodates proposers with multiple slots. |
engagements |
is a matrix that contains the number of the proposer that a given reviewer is matched to (using C++ indexing). The column dimension accommodates reviewers with multiple slots. |
Value
true if the matching is stable, false otherwise