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 +4 -4
- data/lib/statfeed.rb +3 -3
- data/test/test_statfeed.rb +1 -1
- metadata +5 -6
- data/.gemtest +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1210276381bdd49d17bcfc0eee8f0f12dc8c86a4
|
4
|
+
data.tar.gz: 2f8dee0a9d3199f534a8670a582153206b15c974
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ad2a6db4663c78357c64bcab2eb91aa4a5d8d20d5b2574f93ee2be43c36fa91722e960d40103fb8b2d6a13bf9c3f7cb42b71401158f6be4b1261a389e4d387b
|
7
|
+
data.tar.gz: 2b46c58f7c56ddc071e067222fdebe5855694ab217eaf95159dbb1adab867c9b96364fd4aceaf2727f4088295d68c1ecee4ce4d76e0bd139d785bceacdcf2f8c
|
data/lib/statfeed.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Statfeed
|
2
|
-
VERSION = "1.1.
|
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?
|
42
|
+
def acceptable? *args
|
43
43
|
true
|
44
44
|
end
|
45
45
|
|
data/test/test_statfeed.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
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.
|
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
|