From 92187abd81c2184c90763701cb024c45146ca6f6 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 28 Jun 2024 18:28:02 -0700 Subject: [PATCH] mu --- .ruby-version | 2 +- Gemfile | 4 +-- Gemfile.lock | 60 ------------------------------------- lib/rank_king/open_skill.rb | 2 +- 4 files changed, 4 insertions(+), 64 deletions(-) diff --git a/.ruby-version b/.ruby-version index a3ec5a4..eb39e53 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2 +3.3 diff --git a/Gemfile b/Gemfile index 0e4fcbb..b6c7b89 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,6 @@ group :development do gem "ruby-lsp" # TODO: Set up ruby-lsp # types - gem "rbs-inline" - gem "steep" + # gem "rbs-inline" + # gem "steep" end diff --git a/Gemfile.lock b/Gemfile.lock index 67b7e7e..39ffe75 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,55 +1,19 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.3.4) - base64 - bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) - ast (2.4.2) - base64 (0.2.0) bigdecimal (3.1.8) - concurrent-ruby (1.3.3) - connection_pool (2.4.1) - csv (3.3.0) - drb (2.2.1) - ffi (1.17.0-arm64-darwin) - fileutils (1.7.2) - i18n (1.14.5) - concurrent-ruby (~> 1.0) - json (2.7.2) language_server-protocol (3.17.0.3) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) logger (1.6.0) minitest (5.24.0) - mutex_m (0.2.0) - parser (3.3.3.0) - ast (~> 2.4.1) - racc phlex (1.10.3) prism (0.30.0) - racc (1.8.0) rack (3.1.4) rackup (2.1.0) rack (>= 3) webrick (~> 1.8) - rainbow (3.1.1) rake (13.2.1) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) rbs (3.5.1) logger - rbs-inline (0.4.0) - prism (>= 0.29, < 0.31) - rbs (~> 3.5.0) roda (3.81.0) rack ruby-lsp (0.17.4) @@ -57,33 +21,11 @@ GEM prism (>= 0.29.0, < 0.31) rbs (>= 3, < 4) sorbet-runtime (>= 0.5.10782) - securerandom (0.3.1) sequel (5.81.0) bigdecimal sorbet-runtime (0.5.11460) sqlite3 (2.0.2-arm64-darwin) - steep (1.7.1) - activesupport (>= 5.1) - concurrent-ruby (>= 1.1.10) - csv (>= 3.0.9) - fileutils (>= 1.1.0) - json (>= 2.1.0) - language_server-protocol (>= 3.15, < 4.0) - listen (~> 3.0) - logger (>= 1.3.0) - parser (>= 3.1) - rainbow (>= 2.2.2, < 4.0) - rbs (>= 3.5.0.pre) - securerandom (>= 0.1) - strscan (>= 1.0.0) - terminal-table (>= 2, < 4) - strscan (3.1.0) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) tilt (2.4.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) webrick (1.8.1) PLATFORMS @@ -96,12 +38,10 @@ DEPENDENCIES phlex rackup rake - rbs-inline roda ruby-lsp sequel sqlite3 - steep tilt BUNDLED WITH diff --git a/lib/rank_king/open_skill.rb b/lib/rank_king/open_skill.rb index 6487474..34a5fc9 100644 --- a/lib/rank_king/open_skill.rb +++ b/lib/rank_king/open_skill.rb @@ -79,7 +79,7 @@ module RankKing } end - def rating(mu: nil, sigma: nil) + def rating(mu: nil, sigma: nil) #:: Rating mu ||= @mu sigma ||= mu / @z Rating.new(mu: mu.to_f, sigma: sigma.to_f)