gale_shapley 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -1
- data/gale_shapley.gemspec +1 -1
- data/lib/gale_shapley/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 508b2fc5f2fbab3cf5297690b1d4a9547e2caf775dbf2bc589959f9300443cbd
|
4
|
+
data.tar.gz: 30cca2ddb649a01a490497e7399d098f58f3cc67fd03014308e80cab053f134a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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',
|
data/lib/gale_shapley/version.rb
CHANGED
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.
|
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.
|
43
|
+
version: 2.5.0
|
44
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|