土屋直之です。リンクはこちら。


In [1]:
using MyMatching

testを実行します。


In [2]:
Pkg.test("MyMatching")


INFO: Testing MyMatching
INFO: MyMatching tests passed

testは通りました。以下はwikipediaの例です。


In [4]:
m_prefs = [[1, 2, 3, 4], [3, 2, 1, 4], [1, 2, 4, 3], [3, 1, 4, 2]]
f_prefs = [[1, 2, 3, 4], [2, 1, 4, 3], [2, 3, 1, 4], [1, 4, 3, 2]]
my_deferred_acceptance(m_prefs, f_prefs)


Out[4]:
([1,3,2,4],[1,3,2,4])

以上のようにマッチングされました。