fathom 0.2.0 → 0.2.1

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/.gitignore CHANGED
@@ -3,4 +3,4 @@
3
3
  coverage
4
4
  rdoc
5
5
  pkg
6
- *.gemspec
6
+ *.gemspec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -39,7 +39,7 @@ class Fathom::DataNode
39
39
 
40
40
  protected
41
41
  def rng
42
- @rng ||= GSL::Rng.alloc
42
+ @rng ||= GSL::Rng.alloc(GSL::Rng::MT19937_1999, Kernel.rand(100_000))
43
43
  end
44
44
 
45
45
  end
@@ -0,0 +1,5 @@
1
+ class Array
2
+ def rand
3
+ self[Kernel.rand(self.length)]
4
+ end
5
+ end
@@ -87,7 +87,7 @@ module Fathom
87
87
  end
88
88
 
89
89
  def rng
90
- @rng ||= GSL::Rng.alloc
90
+ @rng ||= GSL::Rng.alloc(GSL::Rng::MT19937_1999, Kernel.rand(100_000))
91
91
  end
92
92
  end
93
93
 
data/lib/fathom.rb CHANGED
@@ -10,6 +10,7 @@ require "gsl"
10
10
  require 'options_hash'
11
11
 
12
12
  require 'ext/open_struct'
13
+ require 'ext/array'
13
14
 
14
15
  module Fathom
15
16
  lib = File.expand_path(File.dirname(__FILE__))
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fathom
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - David
@@ -53,7 +53,6 @@ files:
53
53
  - Rakefile
54
54
  - VERSION
55
55
  - autotest/discover.rb
56
- - fathom.gemspec
57
56
  - lib/fathom.rb
58
57
  - lib/fathom/agent.rb
59
58
  - lib/fathom/agent/agent_cluster.rb
@@ -69,6 +68,7 @@ files:
69
68
  - lib/fathom/combined_plausibilities.rb
70
69
  - lib/fathom/concept.rb
71
70
  - lib/fathom/data_node.rb
71
+ - lib/fathom/ext/array.rb
72
72
  - lib/fathom/ext/faster_csv.rb
73
73
  - lib/fathom/ext/open_struct.rb
74
74
  - lib/fathom/import.rb
data/fathom.gemspec DELETED
@@ -1,117 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{fathom}
8
- s.version = "0.2.0"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["David"]
12
- s.date = %q{2010-11-07}
13
- s.description = %q{Collecting some decision support tools in a decoupled Ruby library.}
14
- s.email = %q{davidlamontrichards@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".bundle/config",
21
- ".document",
22
- ".gitignore",
23
- ".rspec",
24
- "Gemfile",
25
- "Gemfile.lock",
26
- "LICENSE",
27
- "README.md",
28
- "Rakefile",
29
- "VERSION",
30
- "autotest/discover.rb",
31
- "fathom.gemspec",
32
- "lib/fathom.rb",
33
- "lib/fathom/agent.rb",
34
- "lib/fathom/agent/agent_cluster.rb",
35
- "lib/fathom/agent/properties.rb",
36
- "lib/fathom/archive/conditional_probability_matrix.rb",
37
- "lib/fathom/archive/n2.rb",
38
- "lib/fathom/archive/n3.rb",
39
- "lib/fathom/archive/node.rb",
40
- "lib/fathom/archive/noodle.rb",
41
- "lib/fathom/archive/scratch.rb",
42
- "lib/fathom/basic_node.rb",
43
- "lib/fathom/causal_graph.rb",
44
- "lib/fathom/combined_plausibilities.rb",
45
- "lib/fathom/concept.rb",
46
- "lib/fathom/data_node.rb",
47
- "lib/fathom/ext/faster_csv.rb",
48
- "lib/fathom/ext/open_struct.rb",
49
- "lib/fathom/import.rb",
50
- "lib/fathom/import/csv_import.rb",
51
- "lib/fathom/import/yaml_import.rb",
52
- "lib/fathom/inverter.rb",
53
- "lib/fathom/knowledge_base.rb",
54
- "lib/fathom/monte_carlo_set.rb",
55
- "lib/fathom/node_utilities.rb",
56
- "lib/fathom/plausible_range.rb",
57
- "lib/fathom/simulation.rb",
58
- "lib/fathom/simulation/tick_methods.rb",
59
- "lib/fathom/simulation/tick_simulation.rb",
60
- "lib/fathom/value_aggregator.rb",
61
- "lib/fathom/value_description.rb",
62
- "lib/fathom/value_multiplier.rb",
63
- "lib/options_hash.rb",
64
- "spec/fathom/agent/agent_cluster_spec.rb",
65
- "spec/fathom/agent_spec.rb",
66
- "spec/fathom/data_node_spec.rb",
67
- "spec/fathom/import/csv_import_spec.rb",
68
- "spec/fathom/import/yaml_import_spec.rb",
69
- "spec/fathom/import_spec.rb",
70
- "spec/fathom/knowledge_base_spec.rb",
71
- "spec/fathom/monte_carlo_set_spec.rb",
72
- "spec/fathom/plausible_range_spec.rb",
73
- "spec/fathom/simulation/tick_simulation_spec.rb",
74
- "spec/fathom/simulation_spec.rb",
75
- "spec/fathom/value_description_spec.rb",
76
- "spec/fathom_spec.rb",
77
- "spec/spec_helper.rb",
78
- "spec/support/demo.yml",
79
- "spec/support/demo_agent.rb"
80
- ]
81
- s.homepage = %q{http://github.com/davidrichards/fathom}
82
- s.rdoc_options = ["--charset=UTF-8"]
83
- s.require_paths = ["lib"]
84
- s.rubygems_version = %q{1.3.7}
85
- s.summary = %q{Decision Support in Ruby}
86
- s.test_files = [
87
- "spec/fathom/agent/agent_cluster_spec.rb",
88
- "spec/fathom/agent_spec.rb",
89
- "spec/fathom/data_node_spec.rb",
90
- "spec/fathom/import/csv_import_spec.rb",
91
- "spec/fathom/import/yaml_import_spec.rb",
92
- "spec/fathom/import_spec.rb",
93
- "spec/fathom/knowledge_base_spec.rb",
94
- "spec/fathom/monte_carlo_set_spec.rb",
95
- "spec/fathom/plausible_range_spec.rb",
96
- "spec/fathom/simulation/tick_simulation_spec.rb",
97
- "spec/fathom/simulation_spec.rb",
98
- "spec/fathom/value_description_spec.rb",
99
- "spec/fathom_spec.rb",
100
- "spec/spec_helper.rb",
101
- "spec/support/demo_agent.rb"
102
- ]
103
-
104
- if s.respond_to? :specification_version then
105
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
106
- s.specification_version = 3
107
-
108
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
109
- s.add_development_dependency(%q<rspec>, [">= 0"])
110
- else
111
- s.add_dependency(%q<rspec>, [">= 0"])
112
- end
113
- else
114
- s.add_dependency(%q<rspec>, [">= 0"])
115
- end
116
- end
117
-