statfeed 1.1.0 → 1.1.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
  SHA1:
3
- metadata.gz: 9c6c540c16236c35e45d7f0b20f1ec84d4d2c624
4
- data.tar.gz: 77ab3b7498230d2c6bed53d4bd3e5a5173e32ac4
3
+ metadata.gz: 1210276381bdd49d17bcfc0eee8f0f12dc8c86a4
4
+ data.tar.gz: 2f8dee0a9d3199f534a8670a582153206b15c974
5
5
  SHA512:
6
- metadata.gz: 350b2dfe60dd2801cbee43b6aed20e5d8a2161478465797bcadabfcf182c4a0a3737e416d9859f77676164d12efc4c77a9fccdf3a77f7ec0e1aae1cef572ef77
7
- data.tar.gz: 762e4da1cfc1305d3b66e514efa831cb393a989d3245812bb3e0cf27cdadf5076a67d02444c05519f8ce66c626639a44caac45cce2b2915f2f903dcfb2a3f022
6
+ metadata.gz: 7ad2a6db4663c78357c64bcab2eb91aa4a5d8d20d5b2574f93ee2be43c36fa91722e960d40103fb8b2d6a13bf9c3f7cb42b71401158f6be4b1261a389e4d387b
7
+ data.tar.gz: 2b46c58f7c56ddc071e067222fdebe5855694ab217eaf95159dbb1adab867c9b96364fd4aceaf2727f4088295d68c1ecee4ce4d76e0bd139d785bceacdcf2f8c
@@ -1,5 +1,5 @@
1
1
  class Statfeed
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.2"
3
3
  attr_accessor :weights, :choices, :randoms, :heterogeneities, :accents, :statistics, :size, :decisions, :options
4
4
 
5
5
  def initialize decisions, options, heterogeneity: 0.1, accent: 1.0
@@ -30,7 +30,7 @@ class Statfeed
30
30
  @choices.tap do |choices|
31
31
  @decisions.each_index do |decision|
32
32
  options = sort_options(scheduling_values(decision))
33
- index = options.find_index {|o| acceptable? o}
33
+ index = options.find_index {|o| acceptable? o, decision}
34
34
  choices[decision] = options[index]
35
35
  increment_statistics decision, index
36
36
  normalize_statistics! decision
@@ -39,7 +39,7 @@ class Statfeed
39
39
  end
40
40
 
41
41
  # Default is "everything's okay"
42
- def acceptable? o
42
+ def acceptable? *args
43
43
  true
44
44
  end
45
45
 
@@ -34,7 +34,7 @@ class TestStatfeed < Minitest::Test
34
34
 
35
35
  def test_additional_constraints
36
36
  # Define a new method excluding the a
37
- def @sf.acceptable? o
37
+ def @sf.acceptable? o, *args
38
38
  o != 'a'
39
39
  end
40
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statfeed
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.13'
33
+ version: '3.14'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.13'
40
+ version: '3.14'
41
41
  description: |-
42
42
  Statistical feedback algorithm in Ruby. Taken from Charles Ames' paper
43
43
  "Statistics and Compositional Balance," in Perspectives of New Music.
@@ -52,7 +52,6 @@ extra_rdoc_files:
52
52
  - README.txt
53
53
  files:
54
54
  - ".autotest"
55
- - ".gemtest"
56
55
  - History.txt
57
56
  - Manifest.txt
58
57
  - README.txt
@@ -82,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
81
  version: '0'
83
82
  requirements: []
84
83
  rubyforge_project:
85
- rubygems_version: 2.4.5
84
+ rubygems_version: 2.2.2
86
85
  signing_key:
87
86
  specification_version: 4
88
87
  summary: Statistical feedback algorithm in Ruby
data/.gemtest DELETED
File without changes