checkStabilityRoommate: Check if a matching solves the stable roommate problem
Description
This function checks if a given matching is stable for a particular set of
preferences. This function checks if there's an unmatched pair that would
rather be matched with each other than with their assigned partners.
Usage
checkStabilityRoommate(pref, matchings)
Arguments
pref
is a matrix with ordinal rankings of the participants
matchings
is an nx1 matrix encoding who is matched to whom using
R style indexing