ruby_native_statistics 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d28a071262364616d7c795523cdb92d3599a4a8
4
- data.tar.gz: ff6bbc9fd223643270f11306e500cb30c70722d8
3
+ metadata.gz: 52cf53c63c8128a6280c289b0670c3e60e999c2b
4
+ data.tar.gz: 963420d1f1b62e85553b2d377eaa0fc929194799
5
5
  SHA512:
6
- metadata.gz: 681db7264f890633e2b60534f3c555cbc2672597734c070d313bd04d266b086fa79b1871cbcc170754820b15b785ba4dfeafe8ccf809dfe9e158fd28bc245656
7
- data.tar.gz: d6a4a73bb61fce93344efb29f14adae989404b3e6287e8df4f3b15aee42d2eba30da19be791ce1cc3678d490f4163b141b88aaf8c0a68cfe98d7ddd9aab16f32
6
+ metadata.gz: 3fc91f7644dd63d5a3d472c7258c536bec4537859703e4dab6398688c6a0320d138a6be7b256d2067b327e19c909c2a58e1d671f93e5a7ee3a82d6ecaa367143
7
+ data.tar.gz: 44c796d4939933db97bd403368fe17f498ac07da9ef1f76db78c478e5530c78d4c875f17765d04fff28cd19dbd3d3f95a9720af6fac39e7bc9cbc29d2c599304
data/.gitignore CHANGED
@@ -35,3 +35,5 @@ Gemfile.lock
35
35
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
36
36
  .rvmrc
37
37
  *.bundle
38
+
39
+ .env
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
4
- - 2.2.5
5
- - 2.1.9
3
+ - 2.4.1
4
+ - 2.3.3
5
+ - 2.2.6
6
6
  before_install:
7
7
  - gem install bundler
data/README.md CHANGED
@@ -9,8 +9,7 @@ This is a native extension to Ruby that adds native (C) statistical functions to
9
9
  * [Sample Variance](https://en.wikipedia.org/wiki/Variance#Population_variance_and_sample_variance) (var)
10
10
  * [Population Variance](https://en.wikipedia.org/wiki/Variance#Population_variance_and_sample_variance) (varp)
11
11
 
12
-
13
- Check the TravisCI build to see the currently supported versions of Ruby. This list will match whatever versions are specified at https://www.ruby-lang.org/en/downloads/.
12
+ Check the TravisCI build to see the currently supported versions of Ruby. This list will match whatever stable versions are specified at https://www.ruby-lang.org/en/downloads/.
14
13
 
15
14
  It is much more performant than calculating the standard deviation with pure Ruby. For a comparison, run the benchmarks with rake.
16
15
 
@@ -30,9 +30,11 @@ double calculate_total_distance_from_mean(VALUE array, unsigned long array_lengt
30
30
  }
31
31
 
32
32
  VALUE rb_sample_standard_deviation(VALUE self) {
33
+ unsigned int array_length;
34
+
33
35
  Check_Type(self, T_ARRAY);
34
36
 
35
- unsigned int array_length = rb_long2int(RARRAY_LEN(self));
37
+ array_length = rb_long2int(RARRAY_LEN(self));
36
38
 
37
39
  if (array_length <= 1) {
38
40
  rb_raise(rb_eRangeError, "array must have more than one element");
@@ -42,9 +44,11 @@ VALUE rb_sample_standard_deviation(VALUE self) {
42
44
  }
43
45
 
44
46
  VALUE rb_sample_variance(VALUE self) {
47
+ unsigned int array_length;
48
+
45
49
  Check_Type(self, T_ARRAY);
46
50
 
47
- unsigned int array_length = rb_long2int(RARRAY_LEN(self));
51
+ array_length = rb_long2int(RARRAY_LEN(self));
48
52
 
49
53
  if (array_length <= 1) {
50
54
  rb_raise(rb_eRangeError, "array must have more than one element");
@@ -54,9 +58,11 @@ VALUE rb_sample_variance(VALUE self) {
54
58
  }
55
59
 
56
60
  VALUE rb_population_standard_deviation(VALUE self) {
61
+ unsigned int array_length;
62
+
57
63
  Check_Type(self, T_ARRAY);
58
64
 
59
- unsigned int array_length = rb_long2int(RARRAY_LEN(self));
65
+ array_length = rb_long2int(RARRAY_LEN(self));
60
66
 
61
67
  if (array_length <= 1) {
62
68
  rb_raise(rb_eRangeError, "array must have more than one element");
@@ -66,9 +72,11 @@ VALUE rb_population_standard_deviation(VALUE self) {
66
72
  }
67
73
 
68
74
  VALUE rb_population_variance(VALUE self) {
75
+ unsigned int array_length;
76
+
69
77
  Check_Type(self, T_ARRAY);
70
78
 
71
- unsigned int array_length = rb_long2int(RARRAY_LEN(self));
79
+ array_length = rb_long2int(RARRAY_LEN(self));
72
80
 
73
81
  if (array_length <= 1) {
74
82
  rb_raise(rb_eRangeError, "array must have more than one element");
@@ -1,3 +1,3 @@
1
1
  module RubyNativeStatistics
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_native_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory Buecker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-17 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.6.11
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: This is a native extension to Ruby that adds various statistical functions