more_math 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/more_math/entropy.rb +1 -1
- data/lib/more_math/version.rb +1 -1
- data/more_math.gemspec +2 -2
- data/tests/entropy_test.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1d5d444c84412e2b3fb7246e52f29d9672e27ef
|
4
|
+
data.tar.gz: 981958d5893c22734588a132edd51fd28a759691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5438f1293d698a5379a56ba70f3fedafa3931044ad36c4a6bc78d34826d01e118957e27244daaf0b0008d0d598cc8bf49c25f5608fbfed15823ce7041531f023
|
7
|
+
data.tar.gz: ebdde22957a5d1dc9152f673f43e694404db3a8c793070efada5208bbef0f577839eff065d88d5046be705d13dd33843bc020b29b15cbc0fd772289065ac6ec6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/more_math/entropy.rb
CHANGED
data/lib/more_math/version.rb
CHANGED
data/more_math.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: more_math 0.3.
|
2
|
+
# stub: more_math 0.3.1 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "more_math".freeze
|
6
|
-
s.version = "0.3.
|
6
|
+
s.version = "0.3.1"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/tests/entropy_test.rb
CHANGED
@@ -34,11 +34,11 @@ class EntropyTest < Test::Unit::TestCase
|
|
34
34
|
assert_in_delta 4, entropy_ideal(16), 1E-3
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
assert_equal 0,
|
39
|
-
assert_equal 0,
|
40
|
-
assert_in_delta 0.6834,
|
41
|
-
assert_in_delta 0.8167,
|
42
|
-
assert_in_delta 1.0,
|
37
|
+
def test_entropy_ratio
|
38
|
+
assert_equal 0, entropy_ratio(@empty)
|
39
|
+
assert_equal 0, entropy_ratio(@low)
|
40
|
+
assert_in_delta 0.6834, entropy_ratio(@string), 1E-3
|
41
|
+
assert_in_delta 0.8167, entropy_ratio(@high), 1E-3
|
42
|
+
assert_in_delta 1.0, entropy_ratio(@random), 1E-3
|
43
43
|
end
|
44
44
|
end
|