Stable marriage problem: Difference between revisions
eliminate unneeded parenthesis and complete name change from last edit
(J: distinguish name and index variables for individuals of both genders, and other minor cleanups) |
(eliminate unneeded parenthesis and complete name change from last edit) |
||
Line 366:
galNames=: {."1 fraw
mprefs=: galNames i.
fprefs=: guyNames i.
propose=: dyad define
Line 406:
if. bad=. 0 e. ,stable do.
smoutput 'Better matches:'
smoutput ((guys{guyNames),:(
end.
assert-.bad
|