class StableMatching::Marriage::PhaseIRunner
Public Class Methods
new(alpha_preferences, beta_preferences, opts = {})
click to toggle source
# File lib/stable-matching/marriage/phase_i_runner.rb, line 105 def initialize(alpha_preferences, beta_preferences, opts = {}) @alpha_preferences = alpha_preferences @beta_preferences = beta_preferences @logger = opts.fetch(:logger) end
Public Instance Methods
run()
click to toggle source
# File lib/stable-matching/marriage/phase_i_runner.rb, line 112 def run while @alpha_preferences.unmatched.any? @alpha_preferences.unmatched.each do |partner| top_choice = partner.first_preference simulate_proposal(partner, top_choice) end end end