gale_shapley 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d6bfdc7305e10e3fcdde4751564b5bfbcd9edaa6755f647de6924ead751341d
4
- data.tar.gz: 9dbf58681e7f60f0049cf161faba24614e853e85ecb68565534280c5251b6b4e
3
+ metadata.gz: 508b2fc5f2fbab3cf5297690b1d4a9547e2caf775dbf2bc589959f9300443cbd
4
+ data.tar.gz: 30cca2ddb649a01a490497e7399d098f58f3cc67fd03014308e80cab053f134a
5
5
  SHA512:
6
- metadata.gz: 883f7b324fffd0a657178794afdc4c0a86c6b5dd3590a6734a5e5aa5f5719638abce3bf62b76e1ad9f13ac7b7b478cb9067ad307b10e4e9013a2e5a18a69579f
7
- data.tar.gz: 396b6467f5a149726d05dcad062e5193f759789ddaeb1238d47188806af15d93ae6f48dc534d5582445c1159fe15ac21f70b8d39a58cf9a7fd6cf55493d3859a
6
+ metadata.gz: 4fb312d6faadd6b812f7f669b191e885ddd6b62dfe63297526b0b32508ba3dc0c246b9d8defa85d0dc09902b6004c0c73fa790559ccfb5b3c3e4a85a4fc3aaad
7
+ data.tar.gz: 5c04c3f01717123cf66f4520cd602fc913c2e4e1d2ca60568fe768ecba4fde686083c69200c8d51e90f8b66601aa655d0687802f6871a604c554671c9b2daf72
data/README.md CHANGED
@@ -20,7 +20,22 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- I recommend NOT to use
23
+ '''ruby
24
+ proposers_ranks = {
25
+ '1': ['a', 'b', 'c', 'd'],
26
+ '2': ['c', 'b', 'a', 'd'],
27
+ '3': ['a', 'b', 'd', 'c'],
28
+ '4': ['c', 'a', 'd', 'b'],
29
+ }
30
+ acceptors_ranks = {
31
+ 'a': ['1', '2', '3', '4'],
32
+ 'b': ['2', '1', '4', '3'],
33
+ 'c': ['2', '3', '1', '4'],
34
+ 'd': ['1', '4', '3', '2'],
35
+ }
36
+ GaleShapley.resolve(proposers_ranks, acceptors_ranks)
37
+ #=> {"1"=>"a", "2"=>"c", "3"=>"b", "4"=>"d"}
38
+ '''
24
39
 
25
40
  ## Development
26
41
 
data/gale_shapley.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.description = "This gem provide a basic algorithm to solve 'stable marriage problem'"
11
11
  spec.homepage = 'https://github.com/mrbigass/gale_shapley'
12
12
  spec.license = 'MIT'
13
- spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
13
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
14
14
 
15
15
  spec.metadata = {
16
16
  'bug_tracker_uri' => 'https://github.com/kakubin/gale_shapley/issues',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GaleShapley
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gale_shapley
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akito Hikasa
@@ -40,7 +40,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.3.0
43
+ version: 2.5.0
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="