roommate.checkPreferences: Check if preference order for a one-sided market is complete

View source: R/roommate.R

roommate.checkPreferencesR Documentation

Check if preference order for a one-sided market is complete

Description

Check if preference order for a one-sided market is complete

Usage

roommate.checkPreferences(pref)

Arguments

pref

is a matrix with the preference order of each individual in the market. This argument is only required when utils is not provided. If there are n individuals, then this matrix will be of dimension n-1 by n. The i,jth element refers to j's ith most favorite partner. Preference orders can either be specified using R-indexing (starting at 1) or C++ indexing (starting at 0). The matrix pref must be of dimension n-1 by n. Otherwise, the function will throw an error.

Value

a matrix with preference orderings with proper C++ indices or NULL if the preference order is not complete.


jtilly/matchingR documentation built on Feb. 15, 2023, 3:24 a.m.