random_variates 0.2.0 → 0.2.1

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 +4 -4
  2. data/lib/random_variates.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a634c9ce4183624b1b56fa3c4c753e971c8304a92cb130de598a93fa14668303
4
- data.tar.gz: 7f6819ecdbe4e3ad308e78b69f41be9b2ccd93aaecf67f2df783fb121d4f1867
3
+ metadata.gz: ad1287c49c9f598c3134d80f618d0b06f3b1460cd3f994e4fca651b63288c7e7
4
+ data.tar.gz: 0e20a01d8dd315c5efbc53786c46e057cebaccf4d2b9b89383f552489ea10f91
5
5
  SHA512:
6
- metadata.gz: 14aa27bd3e6c82808cbbe309031f61f567683c1ce2bf078cc3523d637403e2f0988f909a2733683b2616c890bc84d445c5d75668d4b381bcfb059f7d77780b20
7
- data.tar.gz: 72b9a7eebad20ff548519c28e868d97c8e6363abb66669e79d3dda84bc1567a0e43dd2ee116479155487fe94607efe9e8292eff021731fff87fe86c20f220509
6
+ metadata.gz: 6e016c6d0cd2a78cef0370e012a1626cc3fb10164deb23e7d76024526210b0865da56bcfc9bbda8b190bead7c32fb18e671a3dce2370b7ac29dc17af47c7d006
7
+ data.tar.gz: 9b9966f833c456c1bdee865380fe74b8fbe93b58f3273d13e430cace05b2b38e40223f7dcb66902ce2e231d9c7526f03727fdbee58c2d93a08fcdecf348dbf9e
@@ -79,9 +79,9 @@ class Triangle
79
79
  loop do
80
80
  u = rng.next
81
81
  if u < crossover_p
82
- yielder << min + Math.sqrt(range * (mode - min) * u)
82
+ yielder << min + Math.sqrt(@range * (mode - min) * u)
83
83
  else
84
- yielder << max - Math.sqrt(range * (max - mode) * (1.0 - u))
84
+ yielder << max - Math.sqrt(@range * (max - mode) * (1.0 - u))
85
85
  end
86
86
  end
87
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random_variates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul J Sanchez