Content deleted Content added
Indent 4 spaces |
|||
Line 32:
==Algorithm==
'''function'''
Initialize all ''m'' ∈ M and ''w'' ∈ W to ''free''
'''while''' ∃ ''free'' man ''m'' who still has a woman w to propose to {
w = first woman on m's list to whom m has not yet proposed
'''if''' w is ''free''
(m, w) become ''engaged''
'''else''' some pair (m', w) already exists
'''if''' w prefers m to m'
m' becomes ''free''
(m, w) become ''engaged''
'''else'''
(m', w) remain ''engaged''
}
}
Line 90:
*[[Application programming interface|API]]: The MatchingTools API provides a free application programming interface for the Gale–Shapley algorithm.<ref>{{cite web|url=https://matchingtools.com|title=MatchingTools API}}</ref>
*[[Python (programming language)|Python]]: The Gale–Shapley algorithm is included along with several others for generalized matching problems in the <code>QuantEcon/MatchingMarkets.py</code> package<ref>{{cite web|url=https://github.com/QuantEcon/MatchingMarkets.py|title=matchingMarkets.py|date=|work=Python package}}</ref>
*[[
==References==
|