binary_decision_tree 0.1.2 → 0.1.3

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: 64f59202fee8f686cb5ab26ae7b822d8ff61ca7a
4
- data.tar.gz: 854efc7efb4dcb7ca94e849fdbe22b82995bb0f4
3
+ metadata.gz: 176ae688844b3180f70e7e93c296021d912a3f3a
4
+ data.tar.gz: 25a0425eab814205ecaf117ae423f96fc10f4f11
5
5
  SHA512:
6
- metadata.gz: bd504099f5ee5ff32faff134402d0038d646676e852c02c307aadce4ddd218b5991d7a852333a3346437acaccd6216fc0e1aaa565231031ed4c4415ad79d71b4
7
- data.tar.gz: ff8e4382e501d6092cbc4dc8eda2245913cfa1f3afd52eb734a9742c1b7765daee512fb7f8a302d77b5178a78d828edfed7f50f7c4edbcb13db9e1f5d62a4a05
6
+ metadata.gz: 0de132231ce543a3158a1fc14dbd40b3f28bb4a423ce435855730cb60b4acec2eebb75fd699394f8fb2f44ad1726c08ddd95fc20344d638445ab49f24421e41d
7
+ data.tar.gz: 4e4ae80ec858a40e10125b4f1620d76183b3fc5209cd4a30e3624e8060311f5c454394239ce30c39eb71cf67fc6bf8196a616c028e41dbdcbe644daeb98898e1
@@ -43,5 +43,21 @@ module BinaryDecisionTree
43
43
 
44
44
  tree
45
45
  end
46
+
47
+ def ==(obj)
48
+ obj.class == self.class && obj.state == state
49
+ end
50
+
51
+ alias_method :eql?, :==
52
+
53
+ def hash
54
+ state.hash
55
+ end
56
+
57
+ protected
58
+
59
+ def state
60
+ [depth, decisions, mask]
61
+ end
46
62
  end
47
63
  end
@@ -1,3 +1,3 @@
1
1
  module BinaryDecisionTree
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binary_decision_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Haruska
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-12 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.2.2
128
+ rubygems_version: 2.5.2
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A binary decision tree