linefit 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/linefit.rb +1 -1
  3. metadata +8 -9
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 16ab681f54fccf1c7a1cc4f400beb14b8ea7ace2
4
+ data.tar.gz: ba476f7ac58ec9de0932614dfe51b12632f1a845
5
+ SHA512:
6
+ metadata.gz: 2860ec08558453a6a7a4f0cac46a15df1deab73737b844db28b18b795955fc4ac9e6750c947c7a248487de11b0827ecbf7df98d8ce8c65f72d9b5cf209a85bc3
7
+ data.tar.gz: 5bf28fd58e3c72f3733053006116ca695078b891b56ab47cf47417afd5dde7b635470b4ae5f1367dd9ba7d4bf0ba5ba9f83cbf589bf02a7f21136c7cbafade79
data/lib/linefit.rb CHANGED
@@ -438,7 +438,7 @@ private
438
438
  puts "At least two weights must be nonzero!" unless @hush
439
439
  return FALSE
440
440
  end
441
- factor = weights.length / sumw
441
+ factor = weights.length.to_f / sumw
442
442
  weights.collect! {|weight| weight * factor}
443
443
  @weight = weights
444
444
  return TRUE
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linefit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.3.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Eric Cline
@@ -10,7 +9,7 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-07-08 00:00:00.000000000 Z
12
+ date: 2014-07-09 00:00:00.000000000 Z
14
13
  dependencies: []
15
14
  description: LineFit does weighted or unweighted least-squares line fitting to two-dimensional
16
15
  data (y = a + b * x). (Linear Regression)
@@ -26,26 +25,26 @@ files:
26
25
  - CHANGELOG
27
26
  homepage: http://rubygems.org/gems/linefit
28
27
  licenses: []
28
+ metadata: {}
29
29
  post_install_message:
30
30
  rdoc_options: []
31
31
  require_paths:
32
32
  - lib
33
33
  required_ruby_version: !ruby/object:Gem::Requirement
34
- none: false
35
34
  requirements:
36
- - - ! '>='
35
+ - - '>='
37
36
  - !ruby/object:Gem::Version
38
37
  version: '0'
39
38
  required_rubygems_version: !ruby/object:Gem::Requirement
40
- none: false
41
39
  requirements:
42
- - - ! '>='
40
+ - - '>='
43
41
  - !ruby/object:Gem::Version
44
42
  version: '0'
45
43
  requirements: []
46
44
  rubyforge_project:
47
- rubygems_version: 1.8.25
45
+ rubygems_version: 2.0.3
48
46
  signing_key:
49
- specification_version: 3
47
+ specification_version: 4
50
48
  summary: LineFit is a linear regression math class.
51
49
  test_files: []
50
+ has_rdoc: true