accumulators 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +17 -4
- data/Gemfile.lock +30 -12
- data/Guardfile +14 -0
- data/LICENSE.txt +1 -1
- data/README.md +61 -0
- data/VERSION +1 -1
- data/accumulators.gemspec +21 -22
- metadata +36 -37
- data/README.rdoc +0 -27
- data/autotest/discover.rb +0 -1
data/Gemfile
CHANGED
@@ -5,9 +5,22 @@ source "http://rubygems.org"
|
|
5
5
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
|
-
group :development do
|
9
|
-
gem "rspec", "~> 2.
|
10
|
-
gem "bundler", "
|
11
|
-
gem "jeweler", "~> 1.
|
8
|
+
group :development, :test do
|
9
|
+
gem "rspec", "~> 2.6"
|
10
|
+
gem "bundler", ">= 1.0"
|
11
|
+
gem "jeweler", "~> 1.6"
|
12
12
|
gem "rcov", ">= 0"
|
13
|
+
gem "guard"
|
14
|
+
gem "guard-rspec"
|
13
15
|
end
|
16
|
+
|
17
|
+
group :mac do
|
18
|
+
gem "rb-fsevent"
|
19
|
+
gem "growl"
|
20
|
+
end
|
21
|
+
|
22
|
+
group :linux do
|
23
|
+
gem "rb-inotify"
|
24
|
+
gem "libnotify"
|
25
|
+
end
|
26
|
+
|
data/Gemfile.lock
CHANGED
@@ -2,27 +2,45 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
diff-lcs (1.1.2)
|
5
|
+
ffi (1.0.8)
|
5
6
|
git (1.2.5)
|
6
|
-
|
7
|
+
growl (1.0.3)
|
8
|
+
guard (0.3.4)
|
9
|
+
thor (~> 0.14.6)
|
10
|
+
guard-rspec (0.3.1)
|
11
|
+
guard (>= 0.2.2)
|
12
|
+
jeweler (1.6.0)
|
7
13
|
bundler (~> 1.0.0)
|
8
14
|
git (>= 1.2.5)
|
9
15
|
rake
|
10
|
-
|
16
|
+
libnotify (0.3.0)
|
17
|
+
ffi (>= 0.6.2)
|
18
|
+
rake (0.9.0)
|
19
|
+
rb-fsevent (0.4.0)
|
20
|
+
rb-inotify (0.8.4)
|
21
|
+
ffi (>= 0.5.0)
|
11
22
|
rcov (0.9.9)
|
12
|
-
rspec (2.
|
13
|
-
rspec-core (~> 2.
|
14
|
-
rspec-expectations (~> 2.
|
15
|
-
rspec-mocks (~> 2.
|
16
|
-
rspec-core (2.1
|
17
|
-
rspec-expectations (2.
|
23
|
+
rspec (2.6.0)
|
24
|
+
rspec-core (~> 2.6.0)
|
25
|
+
rspec-expectations (~> 2.6.0)
|
26
|
+
rspec-mocks (~> 2.6.0)
|
27
|
+
rspec-core (2.6.1)
|
28
|
+
rspec-expectations (2.6.0)
|
18
29
|
diff-lcs (~> 1.1.2)
|
19
|
-
rspec-mocks (2.
|
30
|
+
rspec-mocks (2.6.0)
|
31
|
+
thor (0.14.6)
|
20
32
|
|
21
33
|
PLATFORMS
|
22
34
|
ruby
|
23
35
|
|
24
36
|
DEPENDENCIES
|
25
|
-
bundler (
|
26
|
-
|
37
|
+
bundler (>= 1.0)
|
38
|
+
growl
|
39
|
+
guard
|
40
|
+
guard-rspec
|
41
|
+
jeweler (~> 1.6)
|
42
|
+
libnotify
|
43
|
+
rb-fsevent
|
44
|
+
rb-inotify
|
27
45
|
rcov
|
28
|
-
rspec (~> 2.
|
46
|
+
rspec (~> 2.6)
|
data/Guardfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec', :version => 2 do
|
5
|
+
watch(%r{^spec/.+_spec\.rb})
|
6
|
+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
|
9
|
+
# Rails example
|
10
|
+
watch(%r{^spec/.+_spec\.rb})
|
11
|
+
watch(%r{^app/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
|
12
|
+
watch(%r{^lib/(.+)\.rb}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
13
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
14
|
+
end
|
data/LICENSE.txt
CHANGED
data/README.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
accumulators
|
2
|
+
============
|
3
|
+
|
4
|
+
A set of statistical accumulators for Ruby. There is a range of containers for
|
5
|
+
different measures, such as count, mean, and mean-variance. You can add values to
|
6
|
+
the containers, and ask for their respective statistical measures. The accumulators
|
7
|
+
use incremental algorithms to update their measures with each addition, so you can
|
8
|
+
add lots of values without needing lots of memory.
|
9
|
+
|
10
|
+
Installation
|
11
|
+
------------
|
12
|
+
$ [sudo] gem install accumulators
|
13
|
+
|
14
|
+
Example Usage
|
15
|
+
-------------
|
16
|
+
|
17
|
+
$ irb
|
18
|
+
>> require 'accumulators'
|
19
|
+
>> mean = Accumulators::Mean.new
|
20
|
+
>> mean.add 1
|
21
|
+
>> mean.add 2
|
22
|
+
>> mean.add 3
|
23
|
+
>> mean.add 4
|
24
|
+
>> mean.count
|
25
|
+
=> 4
|
26
|
+
>> mean.mean
|
27
|
+
=> 2.5
|
28
|
+
|
29
|
+
Available accumulators
|
30
|
+
----------------------
|
31
|
+
|
32
|
+
* Count
|
33
|
+
* Mean
|
34
|
+
* MeanVariance
|
35
|
+
|
36
|
+
TODO
|
37
|
+
----
|
38
|
+
|
39
|
+
* Allow choosing between biased & unbiased variance/standard devation
|
40
|
+
* Skew?
|
41
|
+
* Weighted Means
|
42
|
+
* min, max, and min-max
|
43
|
+
* sum
|
44
|
+
|
45
|
+
Contributing to accumulators
|
46
|
+
----------------------------
|
47
|
+
|
48
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
49
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
50
|
+
* Fork the project
|
51
|
+
* Start a feature/bugfix branch
|
52
|
+
* Commit and push until you are happy with your contribution
|
53
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
54
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
55
|
+
|
56
|
+
Copyright
|
57
|
+
---------
|
58
|
+
|
59
|
+
Copyright (c) 2010-2011 Gavin Heavyside. See LICENSE.txt for
|
60
|
+
further details.
|
61
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/accumulators.gemspec
CHANGED
@@ -5,28 +5,28 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{accumulators}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gavin Heavyside"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-05-23}
|
13
13
|
s.description = %q{Statistical accumulators for Ruby}
|
14
14
|
s.email = %q{gavin@heavyside.co.uk}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README.
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".rspec",
|
22
22
|
"Gemfile",
|
23
23
|
"Gemfile.lock",
|
24
|
+
"Guardfile",
|
24
25
|
"LICENSE.txt",
|
25
|
-
"README.
|
26
|
+
"README.md",
|
26
27
|
"Rakefile",
|
27
28
|
"VERSION",
|
28
29
|
"accumulators.gemspec",
|
29
|
-
"autotest/discover.rb",
|
30
30
|
"features/accumulators.feature",
|
31
31
|
"features/step_definitions/accumulators_steps.rb",
|
32
32
|
"features/support/env.rb",
|
@@ -42,35 +42,34 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.homepage = %q{http://github.com/hgavin/accumulators}
|
43
43
|
s.licenses = ["MIT"]
|
44
44
|
s.require_paths = ["lib"]
|
45
|
-
s.rubygems_version = %q{1.
|
45
|
+
s.rubygems_version = %q{1.6.2}
|
46
46
|
s.summary = %q{Statistical accumulators for Ruby}
|
47
|
-
s.test_files = [
|
48
|
-
"spec/accumulators/count_spec.rb",
|
49
|
-
"spec/accumulators/mean_spec.rb",
|
50
|
-
"spec/accumulators/meanvariance_spec.rb",
|
51
|
-
"spec/spec_helper.rb"
|
52
|
-
]
|
53
47
|
|
54
48
|
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
49
|
s.specification_version = 3
|
57
50
|
|
58
51
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
59
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.
|
60
|
-
s.add_development_dependency(%q<bundler>, ["
|
61
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
52
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.6"])
|
53
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0"])
|
54
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
|
62
55
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<guard>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<guard-rspec>, [">= 0"])
|
63
58
|
else
|
64
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
65
|
-
s.add_dependency(%q<bundler>, ["
|
66
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
59
|
+
s.add_dependency(%q<rspec>, ["~> 2.6"])
|
60
|
+
s.add_dependency(%q<bundler>, [">= 1.0"])
|
61
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
67
62
|
s.add_dependency(%q<rcov>, [">= 0"])
|
63
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
64
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
68
65
|
end
|
69
66
|
else
|
70
|
-
s.add_dependency(%q<rspec>, ["~> 2.
|
71
|
-
s.add_dependency(%q<bundler>, ["
|
72
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
67
|
+
s.add_dependency(%q<rspec>, ["~> 2.6"])
|
68
|
+
s.add_dependency(%q<bundler>, [">= 1.0"])
|
69
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
73
70
|
s.add_dependency(%q<rcov>, [">= 0"])
|
71
|
+
s.add_dependency(%q<guard>, [">= 0"])
|
72
|
+
s.add_dependency(%q<guard-rspec>, [">= 0"])
|
74
73
|
end
|
75
74
|
end
|
76
75
|
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accumulators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 1
|
8
|
-
- 4
|
9
|
-
version: 0.1.4
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.0
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Gavin Heavyside
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date:
|
13
|
+
date: 2011-05-23 00:00:00 +01:00
|
18
14
|
default_executable:
|
19
15
|
dependencies:
|
20
16
|
- !ruby/object:Gem::Dependency
|
@@ -24,11 +20,7 @@ dependencies:
|
|
24
20
|
requirements:
|
25
21
|
- - ~>
|
26
22
|
- !ruby/object:Gem::Version
|
27
|
-
|
28
|
-
- 2
|
29
|
-
- 1
|
30
|
-
- 0
|
31
|
-
version: 2.1.0
|
23
|
+
version: "2.6"
|
32
24
|
type: :development
|
33
25
|
prerelease: false
|
34
26
|
version_requirements: *id001
|
@@ -37,13 +29,9 @@ dependencies:
|
|
37
29
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
30
|
none: false
|
39
31
|
requirements:
|
40
|
-
- -
|
32
|
+
- - ">="
|
41
33
|
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
- 1
|
44
|
-
- 0
|
45
|
-
- 0
|
46
|
-
version: 1.0.0
|
34
|
+
version: "1.0"
|
47
35
|
type: :development
|
48
36
|
prerelease: false
|
49
37
|
version_requirements: *id002
|
@@ -54,11 +42,7 @@ dependencies:
|
|
54
42
|
requirements:
|
55
43
|
- - ~>
|
56
44
|
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
- 1
|
59
|
-
- 5
|
60
|
-
- 1
|
61
|
-
version: 1.5.1
|
45
|
+
version: "1.6"
|
62
46
|
type: :development
|
63
47
|
prerelease: false
|
64
48
|
version_requirements: *id003
|
@@ -69,12 +53,32 @@ dependencies:
|
|
69
53
|
requirements:
|
70
54
|
- - ">="
|
71
55
|
- !ruby/object:Gem::Version
|
72
|
-
segments:
|
73
|
-
- 0
|
74
56
|
version: "0"
|
75
57
|
type: :development
|
76
58
|
prerelease: false
|
77
59
|
version_requirements: *id004
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: guard
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: guard-rspec
|
73
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: "0"
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *id006
|
78
82
|
description: Statistical accumulators for Ruby
|
79
83
|
email: gavin@heavyside.co.uk
|
80
84
|
executables: []
|
@@ -83,18 +87,18 @@ extensions: []
|
|
83
87
|
|
84
88
|
extra_rdoc_files:
|
85
89
|
- LICENSE.txt
|
86
|
-
- README.
|
90
|
+
- README.md
|
87
91
|
files:
|
88
92
|
- .document
|
89
93
|
- .rspec
|
90
94
|
- Gemfile
|
91
95
|
- Gemfile.lock
|
96
|
+
- Guardfile
|
92
97
|
- LICENSE.txt
|
93
|
-
- README.
|
98
|
+
- README.md
|
94
99
|
- Rakefile
|
95
100
|
- VERSION
|
96
101
|
- accumulators.gemspec
|
97
|
-
- autotest/discover.rb
|
98
102
|
- features/accumulators.feature
|
99
103
|
- features/step_definitions/accumulators_steps.rb
|
100
104
|
- features/support/env.rb
|
@@ -120,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
124
|
requirements:
|
121
125
|
- - ">="
|
122
126
|
- !ruby/object:Gem::Version
|
123
|
-
hash:
|
127
|
+
hash: -274752833993731131
|
124
128
|
segments:
|
125
129
|
- 0
|
126
130
|
version: "0"
|
@@ -129,18 +133,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
133
|
requirements:
|
130
134
|
- - ">="
|
131
135
|
- !ruby/object:Gem::Version
|
132
|
-
segments:
|
133
|
-
- 0
|
134
136
|
version: "0"
|
135
137
|
requirements: []
|
136
138
|
|
137
139
|
rubyforge_project:
|
138
|
-
rubygems_version: 1.
|
140
|
+
rubygems_version: 1.6.2
|
139
141
|
signing_key:
|
140
142
|
specification_version: 3
|
141
143
|
summary: Statistical accumulators for Ruby
|
142
|
-
test_files:
|
143
|
-
|
144
|
-
- spec/accumulators/mean_spec.rb
|
145
|
-
- spec/accumulators/meanvariance_spec.rb
|
146
|
-
- spec/spec_helper.rb
|
144
|
+
test_files: []
|
145
|
+
|
data/README.rdoc
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
= accumulators
|
2
|
-
|
3
|
-
Statistical accumulators for Ruby
|
4
|
-
|
5
|
-
== TODO ==
|
6
|
-
|
7
|
-
* Running Mean
|
8
|
-
* Running Variance/Std Deviation (sample and population)
|
9
|
-
* Combination of mean and mean-variance
|
10
|
-
* Skew?
|
11
|
-
* Weighted Means
|
12
|
-
|
13
|
-
== Contributing to accumulators
|
14
|
-
|
15
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
16
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
17
|
-
* Fork the project
|
18
|
-
* Start a feature/bugfix branch
|
19
|
-
* Commit and push until you are happy with your contribution
|
20
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
21
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
22
|
-
|
23
|
-
== Copyright
|
24
|
-
|
25
|
-
Copyright (c) 2010 Gavin Heavyside. See LICENSE.txt for
|
26
|
-
further details.
|
27
|
-
|
data/autotest/discover.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Autotest.add_discovery { "rspec2" }
|