descriptive-statistics 1.1.1 → 1.2.1
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.
- data/.gitignore +1 -0
- data/README.md +2 -0
- data/lib/descriptive-statistics.rb +1 -1
- data/lib/descriptive-statistics/version.rb +1 -1
- data/spec/lib/descriptive-statistics/dispersion_spec.rb +20 -0
- metadata +4 -4
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -11,6 +11,26 @@ describe DescriptiveStatistics::Dispersion do
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
describe '#min' do
|
15
|
+
it 'delegates to array' do
|
16
|
+
DescriptiveStatistics.new([1,2,6]).min.should == 1
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'returns nil if empty' do
|
20
|
+
DescriptiveStatistics.new([]).min.should be_nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#max' do
|
25
|
+
it 'delegates to array' do
|
26
|
+
DescriptiveStatistics.new([1,2,6]).max.should == 6
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'returns nil if empty' do
|
30
|
+
DescriptiveStatistics.new([]).max.should be_nil
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
14
34
|
describe '#percentile_from_value' do
|
15
35
|
it 'returns the precise percentile of each value' do
|
16
36
|
data = [95.1772, 95.1567, 95.1937, 95.1959, 95.1442, 95.061, 95.1591, 95.1195,95.1065, 95.0925, 95.199, 95.1682]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: descriptive-statistics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -82,7 +82,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
segments:
|
84
84
|
- 0
|
85
|
-
hash:
|
85
|
+
hash: 290274969783766992
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash:
|
94
|
+
hash: 290274969783766992
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
97
|
rubygems_version: 1.8.24
|