netica 0.0.15-java → 0.0.16-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -67,6 +67,32 @@ Then, re-read the value of the Belief node.
67
67
 
68
68
  ## Release Notes
69
69
 
70
+ ### Version 0.0.16
71
+
72
+ * Add ActiveNetwork#destroy
73
+
74
+ ### Version 0.0.15
75
+
76
+ * Lock in-use ActiveNetworks to prevent editing collisions
77
+
78
+ ### Version 0.0.14
79
+
80
+ * User may specify optional container for Active Networks
81
+
82
+ ### Version 0.0.11
83
+
84
+ * Move ActiveNetworks inside Environ
85
+
86
+ ### Version 0.0.10
87
+
88
+ * Log Specifics of Node Changes
89
+
90
+ ### Version 0.0.9
91
+
92
+ * Attempt to make Netica Environ a Singleton in JRuby 1.7
93
+
94
+ ### Version 0.0.8
95
+
70
96
  * Added Batch Processing as BayesNetwork#analyze, which takes a hash of node names and their values including an "id", and a list of output nodes, and returns the resulting values of the output nodes, along with the "id".
71
97
 
72
98
  ### Version 0.0.7
@@ -99,6 +99,14 @@ module Netica
99
99
  end
100
100
  return nil
101
101
  end
102
+
103
+ def destroy
104
+ environment = Netica::Environment.instance
105
+ environment.network_container.delete_if{|network| network.token == token}
106
+ if environment.redis
107
+ environment.redis.del(token)
108
+ end
109
+ end
102
110
 
103
111
  # Export the state of the ActiveNetwork as a Hash
104
112
  #
@@ -1,3 +1,3 @@
1
1
  module Netica
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -1,11 +1,14 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Netica::ActiveNetwork do
4
+
4
5
  describe "#new" do
6
+
5
7
  before(:all) do
6
8
  Java::NorsysNetica::Environ.__persistent__ = true
7
9
  Netica::Environment.engage
8
10
  end
11
+
9
12
  after(:all) do
10
13
  Netica::Environment.instance.processor.finalize
11
14
  end
@@ -41,6 +44,12 @@ describe Netica::ActiveNetwork do
41
44
  @active_network.network.node("Tuberculosis").value("present").should be_greater_than 0.092
42
45
  end
43
46
  end
47
+
48
+ it "should be deletable" do
49
+ Netica::Environment.instance.active_networks.length.should eq(1)
50
+ @active_network.destroy
51
+ Netica::Environment.instance.active_networks.length.should eq(0)
52
+ end
44
53
  end
45
54
  end
46
55
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: netica
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.15
5
+ version: 0.0.16
6
6
  platform: java
7
7
  authors:
8
8
  - Jerry Richardson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-27 00:00:00.000000000 Z
12
+ date: 2013-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis