random_bell 0.1.0 → 0.1.1

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: a642dbc691a26cf7c63cbeec3df54322c221e2e5
4
- data.tar.gz: 6afe3bc00805d3dca7bf613e44feac36123a851f
3
+ metadata.gz: b8e2d2c6b448d735826d4bbfa7dab38c3ef046e7
4
+ data.tar.gz: 2ccfb6c3f429860a0501785fc0585c4d97b45b2d
5
5
  SHA512:
6
- metadata.gz: 64283a0a0fd759d0ceb355a6bc4f1ddba4307b872a543b18447f46de7037df12205663be849e2e9d466e4e15e56be192728c4b2c568331c95f365d973034125c
7
- data.tar.gz: 331fc647a8a1e5f71fcb78914e611517338abe7402b9402e03ee02b6a5b19edcf438a5ca2570ade3b4df370a42c6f90eceac4851973842f0e6c07d94d9bca6a6
6
+ metadata.gz: 39671a2d895f381db1e41e2a5137e01ce12065dd40780f21814851a1eee317641bec60b0518365524a5492334730af2a9bc242b886e40ebc1483f5b06cdbb068
7
+ data.tar.gz: ba678c93052cae0515dbe6e3a0a20f8d8dc926db7ba0d54c7d7fa3ebe6c4832abf9fce29e24ace585499d4f9b5ebd6d58850c0448fd1386ddd1ceeb0a8287051
@@ -1,3 +1,3 @@
1
1
  class RandomBell
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/random_bell.rb CHANGED
@@ -29,8 +29,8 @@ class RandomBell
29
29
  numbers = (1..size).to_a.map{ rand }
30
30
 
31
31
  klasses, klass_width = [], (@range.max - @range.min).to_f / rows
32
- (0..rows).each_cons(2) do |min, max|
33
- klasses << Range.new(klass_width * min, klass_width * max)
32
+ (0..rows).each_cons(2) do |left, right|
33
+ klasses << Range.new(@range.min + klass_width * left, @range.min + klass_width *right)
34
34
  end
35
35
 
36
36
  divider = (klasses.map{|klass| numbers.select{|num| klass.include?(num) }.size }.max / 50.0).ceil
data/random_bell.gemspec CHANGED
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rspec"
23
+ spec.add_development_dependency "rspec", "~> 2"
24
24
  end
@@ -28,7 +28,7 @@ describe RandomBell do
28
28
  end
29
29
 
30
30
  it "drow histgram", histogram: true do
31
- puts @results.to_histogram
31
+ puts @bell.to_histogram
32
32
  end
33
33
  end
34
34
  end
@@ -58,7 +58,7 @@ describe RandomBell do
58
58
  end
59
59
 
60
60
  it "drow histgram", histogram: true do
61
- puts @results.to_histogram
61
+ puts @bell.to_histogram
62
62
  end
63
63
  end
64
64
  end
@@ -88,7 +88,7 @@ describe RandomBell do
88
88
  end
89
89
 
90
90
  it "drow histgram", histogram: true do
91
- puts @results.to_histogram
91
+ puts @bell.to_histogram
92
92
  end
93
93
  end
94
94
  end
@@ -114,7 +114,7 @@ describe RandomBell do
114
114
  end
115
115
 
116
116
  it "drow histgram", histogram: true do
117
- puts @results.to_histogram
117
+ puts @bell.to_histogram
118
118
  end
119
119
  end
120
120
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random_bell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OSA Shunsuke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2'
55
55
  description: Normal(Gaussian) random number generator.
56
56
  email:
57
57
  - hhelibebcnofnenamg@gmail.com