Hello R Developers, I have made a new code for this algorithm in R. In the
end I present an very small example with system.time computing.
Gale-Shapley Many-to-One (Note that many are always in Rows):
#
#
gsa
VictorDelgado wrote
>
> gsa <- function(m, n, preference.row, preference.col, first)
> {
> # m: number of rows (men)
> # n: number of columns (women)
> # first 1 for row (men); and 2 for column (women)
> #
> # Two Auxiliary functions:
> # 1:
> min.n <- function(x,n,value=TRUE){
> s <- sort(x, ind
2 matches
Mail list logo