Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The Stable Marriage Problem is a mathematical problem that attempts to uniquely match a set of N items (classically male suitors) with another set of N items (classically females the suitors wish to marry). The final matches are referred to as proposals.
This gem provides a variant of the Gale-Shapely algorithm. Gale-Shapely guarantees a complete matching (i.e. every suitor is paired with exactly one female and vice versa). Though this algorithm assumes every member of either group has a complete ranking of the other group. For large populations, this is not always practical.
The algorithm applied here has 2 primary differences from Gale-Shapely
Because of these differences, not every suitor or suitee is guaranteed to have a proposal. Swapping the suitor and suitee sets can have dramatic effects on the final set of proposals.
gem install stable-marriage
require 'stable_marriage'
sm = StableMarriage.new
sm.add_match('Alice', 'Marcus', 0.366)
sm.add_match('Alice', 'Steve', 0.453)
sm.add_match('Alice', 'Will', 0.245)
sm.add_match('Janice', 'Phil', 0.486)
sm.add_match('Janice', 'Steve', 0.304)
sm.add_match('Lily', 'Steve', 0.299)
sm.add_match('Maria', 'Steve', 0.602)
puts sm.proposals
# {
# "Maria" => "Steve",
# "Janice" => "Phil",
# "Alice" => "Marcus"
# }
# Note: neither Lily nor Will were matched in the proposals map
FAQs
Unknown package
We found that stable_marriage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.