nmatrix 0.0.3 → 0.0.4
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 +3 -0
- data/CONTRIBUTING.md +66 -0
- data/Gemfile +1 -1
- data/History.txt +68 -10
- data/LICENSE.txt +2 -2
- data/Manifest.txt +2 -0
- data/README.rdoc +90 -69
- data/Rakefile +18 -9
- data/ext/nmatrix/data/complex.h +7 -7
- data/ext/nmatrix/data/data.cpp +2 -7
- data/ext/nmatrix/data/data.h +7 -4
- data/ext/nmatrix/data/rational.h +2 -2
- data/ext/nmatrix/data/ruby_object.h +3 -10
- data/ext/nmatrix/extconf.rb +79 -54
- data/ext/nmatrix/new_extconf.rb +11 -12
- data/ext/nmatrix/nmatrix.cpp +94 -125
- data/ext/nmatrix/nmatrix.h +38 -17
- data/ext/nmatrix/ruby_constants.cpp +2 -15
- data/ext/nmatrix/ruby_constants.h +2 -14
- data/ext/nmatrix/storage/common.cpp +2 -2
- data/ext/nmatrix/storage/common.h +2 -2
- data/ext/nmatrix/storage/dense.cpp +206 -31
- data/ext/nmatrix/storage/dense.h +5 -2
- data/ext/nmatrix/storage/list.cpp +52 -4
- data/ext/nmatrix/storage/list.h +3 -2
- data/ext/nmatrix/storage/storage.cpp +6 -6
- data/ext/nmatrix/storage/storage.h +2 -2
- data/ext/nmatrix/storage/yale.cpp +202 -49
- data/ext/nmatrix/storage/yale.h +5 -4
- data/ext/nmatrix/ttable_helper.rb +108 -108
- data/ext/nmatrix/types.h +2 -15
- data/ext/nmatrix/util/io.cpp +2 -2
- data/ext/nmatrix/util/io.h +2 -2
- data/ext/nmatrix/util/lapack.h +2 -2
- data/ext/nmatrix/util/math.cpp +14 -14
- data/ext/nmatrix/util/math.h +2 -2
- data/ext/nmatrix/util/sl_list.cpp +2 -2
- data/ext/nmatrix/util/sl_list.h +2 -2
- data/ext/nmatrix/util/util.h +2 -2
- data/lib/nmatrix.rb +13 -35
- data/lib/nmatrix/blas.rb +182 -56
- data/lib/nmatrix/io/market.rb +38 -14
- data/lib/nmatrix/io/mat5_reader.rb +393 -278
- data/lib/nmatrix/io/mat_reader.rb +121 -107
- data/lib/nmatrix/lapack.rb +59 -14
- data/lib/nmatrix/monkeys.rb +32 -30
- data/lib/nmatrix/nmatrix.rb +204 -100
- data/lib/nmatrix/nvector.rb +166 -57
- data/lib/nmatrix/shortcuts.rb +364 -231
- data/lib/nmatrix/version.rb +8 -4
- data/nmatrix.gemspec +5 -3
- data/scripts/mac-brew-gcc.sh +1 -1
- data/spec/blas_spec.rb +80 -2
- data/spec/math_spec.rb +78 -32
- data/spec/nmatrix_list_spec.rb +55 -55
- data/spec/nmatrix_spec.rb +60 -117
- data/spec/nmatrix_yale_resize_test_associations.yaml +2802 -0
- data/spec/nmatrix_yale_spec.rb +214 -198
- data/spec/nvector_spec.rb +58 -2
- data/spec/shortcuts_spec.rb +156 -32
- data/spec/slice_spec.rb +229 -178
- data/spec/spec_helper.rb +2 -2
- metadata +71 -21
data/spec/spec_helper.rb
CHANGED
@@ -34,8 +34,8 @@ COMPLEX_MATRIX32A_ARRAY = MATRIX32A_ARRAY.zip(MATRIX32A_ARRAY.reverse).collect {
|
|
34
34
|
RATIONAL_MATRIX43A_ARRAY = MATRIX43A_ARRAY.collect { |x| x.to_r }
|
35
35
|
RATIONAL_MATRIX32A_ARRAY = MATRIX32A_ARRAY.collect { |x| x.to_r }
|
36
36
|
|
37
|
-
def create_matrix(stype)
|
38
|
-
m = NMatrix.new(stype, [3,3], 0, :int32)
|
37
|
+
def create_matrix(stype) #:nodoc:
|
38
|
+
m = stype == :yale ? NMatrix.new(stype, 3, :int32) : NMatrix.new(stype, [3,3], 0, :int32)
|
39
39
|
|
40
40
|
m[0,0] = 0
|
41
41
|
m[0,1] = 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nmatrix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,27 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-05-17 00:00:00.000000000Z
|
15
15
|
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rdoc
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 4.0.1
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 4.0.1
|
16
32
|
- !ruby/object:Gem::Dependency
|
17
33
|
name: rake
|
18
|
-
requirement:
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
19
35
|
none: false
|
20
36
|
requirements:
|
21
37
|
- - ~>
|
@@ -23,10 +39,15 @@ dependencies:
|
|
23
39
|
version: '0.9'
|
24
40
|
type: :development
|
25
41
|
prerelease: false
|
26
|
-
version_requirements:
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
27
48
|
- !ruby/object:Gem::Dependency
|
28
49
|
name: bundler
|
29
|
-
requirement:
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
30
51
|
none: false
|
31
52
|
requirements:
|
32
53
|
- - ! '>='
|
@@ -34,10 +55,15 @@ dependencies:
|
|
34
55
|
version: '0'
|
35
56
|
type: :development
|
36
57
|
prerelease: false
|
37
|
-
version_requirements:
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
38
64
|
- !ruby/object:Gem::Dependency
|
39
65
|
name: rspec
|
40
|
-
requirement:
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
41
67
|
none: false
|
42
68
|
requirements:
|
43
69
|
- - ~>
|
@@ -45,10 +71,15 @@ dependencies:
|
|
45
71
|
version: 2.9.0
|
46
72
|
type: :development
|
47
73
|
prerelease: false
|
48
|
-
version_requirements:
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 2.9.0
|
49
80
|
- !ruby/object:Gem::Dependency
|
50
81
|
name: pry
|
51
|
-
requirement:
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
52
83
|
none: false
|
53
84
|
requirements:
|
54
85
|
- - ~>
|
@@ -56,10 +87,15 @@ dependencies:
|
|
56
87
|
version: 0.9.9
|
57
88
|
type: :development
|
58
89
|
prerelease: false
|
59
|
-
version_requirements:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ~>
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.9.9
|
60
96
|
- !ruby/object:Gem::Dependency
|
61
97
|
name: guard-rspec
|
62
|
-
requirement:
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
63
99
|
none: false
|
64
100
|
requirements:
|
65
101
|
- - ~>
|
@@ -67,10 +103,15 @@ dependencies:
|
|
67
103
|
version: 0.7.0
|
68
104
|
type: :development
|
69
105
|
prerelease: false
|
70
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.7.0
|
71
112
|
- !ruby/object:Gem::Dependency
|
72
113
|
name: rake-compiler
|
73
|
-
requirement:
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
74
115
|
none: false
|
75
116
|
requirements:
|
76
117
|
- - ~>
|
@@ -78,7 +119,12 @@ dependencies:
|
|
78
119
|
version: 0.8.1
|
79
120
|
type: :development
|
80
121
|
prerelease: false
|
81
|
-
version_requirements:
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ~>
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: 0.8.1
|
82
128
|
description: NMatrix is an experimental linear algebra library for Ruby, written mostly
|
83
129
|
in C.
|
84
130
|
email:
|
@@ -90,6 +136,7 @@ extra_rdoc_files: []
|
|
90
136
|
files:
|
91
137
|
- .gitignore
|
92
138
|
- .rspec
|
139
|
+
- CONTRIBUTING.md
|
93
140
|
- Gemfile
|
94
141
|
- Guardfile
|
95
142
|
- History.txt
|
@@ -152,6 +199,7 @@ files:
|
|
152
199
|
- spec/math_spec.rb
|
153
200
|
- spec/nmatrix_list_spec.rb
|
154
201
|
- spec/nmatrix_spec.rb
|
202
|
+
- spec/nmatrix_yale_resize_test_associations.yaml
|
155
203
|
- spec/nmatrix_yale_spec.rb
|
156
204
|
- spec/nvector_spec.rb
|
157
205
|
- spec/shortcuts_spec.rb
|
@@ -165,12 +213,14 @@ post_install_message: ! "*******************************************************
|
|
165
213
|
WARNING ***\nPlease be aware that NMatrix is in ALPHA status. If you're\nthinking
|
166
214
|
of using NMatrix to write mission critical code,\nsuch as for driving a car or flying
|
167
215
|
a space shuttle, you\nmay wish to choose other software (for now).\n\nNMatrix requires
|
168
|
-
a C compiler, and has been tested only\nwith GCC 4.6
|
216
|
+
a C compiler, and has been tested only\nwith GCC 4.6+. We are happy to accept contributions\nwhich
|
169
217
|
improve the portability of this project.\n\nAlso required is ATLAS. Most Linux distributions
|
170
|
-
and Mac\nversions include ATLAS, but you may wish to compile it\nyourself
|
171
|
-
|
172
|
-
|
173
|
-
for
|
218
|
+
and Mac\nversions include ATLAS, but you may wish to compile it\nyourself. Rumor
|
219
|
+
has it that the Ubuntu/Debian apt package\nfor ATLAS WILL NOT WORK with NMatrix.
|
220
|
+
Please install it\nmanually if you are using apt.\n\nMore explicit instructions
|
221
|
+
for NMatrix and SciRuby should\nbe available on the SciRuby website, sciruby.com,
|
222
|
+
or\nthrough our mailing list (which can be found on our web-\nsite).\n\nThanks for
|
223
|
+
trying out NMatrix! Happy coding!\n\n***********************************************************\n"
|
174
224
|
rdoc_options: []
|
175
225
|
require_paths:
|
176
226
|
- lib
|
@@ -188,10 +238,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
238
|
version: '0'
|
189
239
|
segments:
|
190
240
|
- 0
|
191
|
-
hash:
|
241
|
+
hash: 186187539
|
192
242
|
requirements: []
|
193
243
|
rubyforge_project:
|
194
|
-
rubygems_version: 1.8.
|
244
|
+
rubygems_version: 1.8.18
|
195
245
|
signing_key:
|
196
246
|
specification_version: 3
|
197
247
|
summary: NMatrix is an experimental linear algebra library for Ruby, written mostly
|