schulze-vote 2.0.1 → 2.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5f77a19b8cefd291c6e67c45a823eefe6164626
4
- data.tar.gz: 3cf869a665b2dbc0a4e781cddaf4adb455d1fdc1
3
+ metadata.gz: 006f9611d7d1ce402ba8a73529940c2917b1e19e
4
+ data.tar.gz: 93cb87c111879d5fa7279cbf5f8dbde945bbd028
5
5
  SHA512:
6
- metadata.gz: 3e2582afe8d5fb85b18ca1ce4210b8efb7d72e0968e729ec2d5e42380a3aa8db2389b2836df424ef72c31aaf1e1d7c4d43ee7eb49b08bbb828294315a3436b92
7
- data.tar.gz: a081d192a256023d18469f7c34d584e73739f827537ab49ed814842455d7f08b1a02eeb6d3fdbb91a1748efa9d22cecbe2e14b7444001e6e230fd90d3b0a160c
6
+ metadata.gz: f0ab924ee00d937d049adfffaae4d0411e32074fe50614244c0591c342976b87de6af4a48a9de41b97865d7783fe229979117d31d361e7cfba16efb1faf25c3f
7
+ data.tar.gz: de2a95d3062b1d0523458e723009ec86ce88e1f085fa7b0eacfd031ff651b1582484b32d86ad4304db08d6ddead6ba29752ef3f806c14e82965ebed547418ee8
data/README.md CHANGED
@@ -137,6 +137,8 @@ Output:
137
137
 
138
138
  ## Example
139
139
 
140
+ Example 1 from Wikipedia
141
+
140
142
  https://en.wikipedia.org/wiki/User:MarkusSchulze/Schulze_method_examples
141
143
 
142
144
  Result should be:
@@ -169,16 +171,27 @@ puts_m vs.play_matrix
169
171
  [25, 28, 28, 0, 24]
170
172
  [25, 28, 28, 31, 0]
171
173
 
172
- puts vs.
174
+ puts vs.winners_array.to_s
175
+
176
+ #=> [0, 0, 0, 0, 1]
177
+
178
+ puts_m vs.result_matrix
173
179
 
174
- expect(vs.ranks).to eq [3, 1, 2, 0, 4] # E > A > C > B > D
175
- end
180
+ #=> [0, 1, 1, 1, 0]
181
+ [0, 0, 0, 1, 0]
182
+ [0, 1, 0, 1, 0]
183
+ [0, 0, 0, 0, 0]
184
+ [1, 1, 1, 1, 0]
185
+
186
+ vs.classifications.each do |classification|
187
+ puts classification.map { |e| idx_to_chr(e) }.to_s
188
+ end
189
+
190
+ #=> ["E", "A", "C", "B", "D"]
176
191
  ```
177
192
 
178
193
  which is the same result of the reference above.
179
194
 
180
- The result strings are always in format `Candidate:Position`, because it's possible that multiple candidates can be on the same rank.
181
-
182
195
  ## Contributing to schulze-vote
183
196
 
184
197
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schulze-vote
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi