nmatrix 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/ext/nmatrix/data/complex.h +20 -55
  3. data/ext/nmatrix/data/data.cpp +11 -44
  4. data/ext/nmatrix/data/data.h +174 -311
  5. data/ext/nmatrix/data/meta.h +1 -7
  6. data/ext/nmatrix/data/ruby_object.h +3 -85
  7. data/ext/nmatrix/extconf.rb +2 -73
  8. data/ext/nmatrix/math.cpp +170 -813
  9. data/ext/nmatrix/math/asum.h +2 -25
  10. data/ext/nmatrix/math/{inc.h → cblas_enums.h} +11 -22
  11. data/ext/nmatrix/math/cblas_templates_core.h +507 -0
  12. data/ext/nmatrix/math/gemm.h +2 -32
  13. data/ext/nmatrix/math/gemv.h +1 -35
  14. data/ext/nmatrix/math/getrf.h +21 -6
  15. data/ext/nmatrix/math/getrs.h +0 -8
  16. data/ext/nmatrix/math/imax.h +0 -22
  17. data/ext/nmatrix/math/long_dtype.h +0 -3
  18. data/ext/nmatrix/math/math.h +11 -337
  19. data/ext/nmatrix/math/nrm2.h +2 -23
  20. data/ext/nmatrix/math/rot.h +1 -25
  21. data/ext/nmatrix/math/rotg.h +4 -13
  22. data/ext/nmatrix/math/scal.h +0 -22
  23. data/ext/nmatrix/math/trsm.h +0 -55
  24. data/ext/nmatrix/math/util.h +148 -0
  25. data/ext/nmatrix/nmatrix.cpp +0 -14
  26. data/ext/nmatrix/nmatrix.h +92 -84
  27. data/ext/nmatrix/ruby_constants.cpp +0 -2
  28. data/ext/nmatrix/ruby_constants.h +0 -2
  29. data/ext/nmatrix/ruby_nmatrix.c +86 -45
  30. data/ext/nmatrix/storage/dense/dense.cpp +1 -7
  31. data/ext/nmatrix/storage/storage.h +0 -1
  32. data/ext/nmatrix/ttable_helper.rb +0 -6
  33. data/ext/nmatrix/util/io.cpp +1 -1
  34. data/lib/nmatrix.rb +1 -19
  35. data/lib/nmatrix/blas.rb +33 -11
  36. data/lib/nmatrix/io/market.rb +3 -3
  37. data/lib/nmatrix/lapack_core.rb +181 -0
  38. data/lib/nmatrix/lapack_plugin.rb +44 -0
  39. data/lib/nmatrix/math.rb +382 -131
  40. data/lib/nmatrix/monkeys.rb +2 -3
  41. data/lib/nmatrix/nmatrix.rb +166 -13
  42. data/lib/nmatrix/shortcuts.rb +72 -7
  43. data/lib/nmatrix/version.rb +2 -2
  44. data/spec/00_nmatrix_spec.rb +154 -5
  45. data/spec/02_slice_spec.rb +2 -6
  46. data/spec/03_nmatrix_monkeys_spec.rb +7 -1
  47. data/spec/blas_spec.rb +60 -33
  48. data/spec/homogeneous_spec.rb +10 -10
  49. data/spec/lapack_core_spec.rb +482 -0
  50. data/spec/math_spec.rb +436 -52
  51. data/spec/shortcuts_spec.rb +28 -4
  52. data/spec/spec_helper.rb +14 -2
  53. data/spec/utm5940.mtx +83844 -0
  54. metadata +49 -76
  55. data/.gitignore +0 -27
  56. data/.rspec +0 -2
  57. data/.travis.yml +0 -15
  58. data/CONTRIBUTING.md +0 -82
  59. data/Gemfile +0 -2
  60. data/History.txt +0 -677
  61. data/LICENSE.txt +0 -23
  62. data/Manifest.txt +0 -92
  63. data/README.rdoc +0 -150
  64. data/Rakefile +0 -216
  65. data/ext/nmatrix/data/rational.h +0 -440
  66. data/ext/nmatrix/math/geev.h +0 -82
  67. data/ext/nmatrix/math/ger.h +0 -96
  68. data/ext/nmatrix/math/gesdd.h +0 -80
  69. data/ext/nmatrix/math/gesvd.h +0 -78
  70. data/ext/nmatrix/math/getf2.h +0 -86
  71. data/ext/nmatrix/math/getri.h +0 -108
  72. data/ext/nmatrix/math/potrs.h +0 -129
  73. data/ext/nmatrix/math/swap.h +0 -52
  74. data/lib/nmatrix/lapack.rb +0 -240
  75. data/nmatrix.gemspec +0 -55
  76. data/scripts/mac-brew-gcc.sh +0 -50
  77. data/scripts/mac-mavericks-brew-gcc.sh +0 -22
  78. data/spec/lapack_spec.rb +0 -459
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Woods
@@ -10,132 +10,132 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-11 00:00:00.000000000 Z
13
+ date: 2015-08-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: rdoc
16
+ name: packable
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '4.0'
21
+ version: '1.3'
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 4.0.1
24
+ version: 1.3.5
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
29
  - - "~>"
30
30
  - !ruby/object:Gem::Version
31
- version: '4.0'
31
+ version: '1.3'
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 4.0.1
34
+ version: 1.3.5
35
35
  - !ruby/object:Gem::Dependency
36
- name: packable
36
+ name: bundler
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '1.3'
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: 1.3.5
45
- type: :runtime
41
+ version: '1.6'
42
+ type: :development
46
43
  prerelease: false
47
44
  version_requirements: !ruby/object:Gem::Requirement
48
45
  requirements:
49
46
  - - "~>"
50
47
  - !ruby/object:Gem::Version
51
- version: '1.3'
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 1.3.5
48
+ version: '1.6'
55
49
  - !ruby/object:Gem::Dependency
56
- name: rake
50
+ name: pry
57
51
  requirement: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - "~>"
60
54
  - !ruby/object:Gem::Version
61
- version: '10.3'
55
+ version: '0.10'
62
56
  type: :development
63
57
  prerelease: false
64
58
  version_requirements: !ruby/object:Gem::Requirement
65
59
  requirements:
66
60
  - - "~>"
67
61
  - !ruby/object:Gem::Version
68
- version: '10.3'
62
+ version: '0.10'
69
63
  - !ruby/object:Gem::Dependency
70
- name: bundler
64
+ name: rake
71
65
  requirement: !ruby/object:Gem::Requirement
72
66
  requirements:
73
67
  - - "~>"
74
68
  - !ruby/object:Gem::Version
75
- version: '1.6'
69
+ version: '10.3'
76
70
  type: :development
77
71
  prerelease: false
78
72
  version_requirements: !ruby/object:Gem::Requirement
79
73
  requirements:
80
74
  - - "~>"
81
75
  - !ruby/object:Gem::Version
82
- version: '1.6'
76
+ version: '10.3'
83
77
  - !ruby/object:Gem::Dependency
84
- name: rspec
78
+ name: rake-compiler
85
79
  requirement: !ruby/object:Gem::Requirement
86
80
  requirements:
87
81
  - - "~>"
88
82
  - !ruby/object:Gem::Version
89
- version: '2.14'
83
+ version: '0.8'
90
84
  type: :development
91
85
  prerelease: false
92
86
  version_requirements: !ruby/object:Gem::Requirement
93
87
  requirements:
94
88
  - - "~>"
95
89
  - !ruby/object:Gem::Version
96
- version: '2.14'
90
+ version: '0.8'
97
91
  - !ruby/object:Gem::Dependency
98
- name: rspec-longrun
92
+ name: rdoc
99
93
  requirement: !ruby/object:Gem::Requirement
100
94
  requirements:
101
95
  - - "~>"
102
96
  - !ruby/object:Gem::Version
103
- version: '1.0'
97
+ version: '4.0'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 4.0.1
104
101
  type: :development
105
102
  prerelease: false
106
103
  version_requirements: !ruby/object:Gem::Requirement
107
104
  requirements:
108
105
  - - "~>"
109
106
  - !ruby/object:Gem::Version
110
- version: '1.0'
107
+ version: '4.0'
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 4.0.1
111
111
  - !ruby/object:Gem::Dependency
112
- name: pry
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.10'
117
+ version: '2.14'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.10'
124
+ version: '2.14'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rake-compiler
126
+ name: rspec-longrun
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.8'
131
+ version: '1.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0.8'
138
+ version: '1.0'
139
139
  description: NMatrix is a linear algebra library for Ruby, written mostly in C and
140
140
  C++.
141
141
  email:
@@ -145,48 +145,31 @@ extensions:
145
145
  - ext/nmatrix/extconf.rb
146
146
  extra_rdoc_files: []
147
147
  files:
148
- - ".gitignore"
149
- - ".rspec"
150
- - ".travis.yml"
151
- - CONTRIBUTING.md
152
- - Gemfile
153
- - History.txt
154
- - LICENSE.txt
155
- - Manifest.txt
156
- - README.rdoc
157
- - Rakefile
158
148
  - ext/nmatrix/binary_format.txt
159
149
  - ext/nmatrix/data/complex.h
160
150
  - ext/nmatrix/data/data.cpp
161
151
  - ext/nmatrix/data/data.h
162
152
  - ext/nmatrix/data/meta.h
163
- - ext/nmatrix/data/rational.h
164
153
  - ext/nmatrix/data/ruby_object.h
165
154
  - ext/nmatrix/extconf.rb
166
155
  - ext/nmatrix/math.cpp
167
156
  - ext/nmatrix/math/asum.h
168
- - ext/nmatrix/math/geev.h
157
+ - ext/nmatrix/math/cblas_enums.h
158
+ - ext/nmatrix/math/cblas_templates_core.h
169
159
  - ext/nmatrix/math/gemm.h
170
160
  - ext/nmatrix/math/gemv.h
171
- - ext/nmatrix/math/ger.h
172
- - ext/nmatrix/math/gesdd.h
173
- - ext/nmatrix/math/gesvd.h
174
- - ext/nmatrix/math/getf2.h
175
161
  - ext/nmatrix/math/getrf.h
176
- - ext/nmatrix/math/getri.h
177
162
  - ext/nmatrix/math/getrs.h
178
163
  - ext/nmatrix/math/imax.h
179
- - ext/nmatrix/math/inc.h
180
164
  - ext/nmatrix/math/laswp.h
181
165
  - ext/nmatrix/math/long_dtype.h
182
166
  - ext/nmatrix/math/math.h
183
167
  - ext/nmatrix/math/nrm2.h
184
- - ext/nmatrix/math/potrs.h
185
168
  - ext/nmatrix/math/rot.h
186
169
  - ext/nmatrix/math/rotg.h
187
170
  - ext/nmatrix/math/scal.h
188
- - ext/nmatrix/math/swap.h
189
171
  - ext/nmatrix/math/trsm.h
172
+ - ext/nmatrix/math/util.h
190
173
  - ext/nmatrix/nm_memory.h
191
174
  - ext/nmatrix/nmatrix.cpp
192
175
  - ext/nmatrix/nmatrix.h
@@ -228,7 +211,8 @@ files:
228
211
  - lib/nmatrix/io/mat5_reader.rb
229
212
  - lib/nmatrix/io/mat_reader.rb
230
213
  - lib/nmatrix/io/point_cloud.rb
231
- - lib/nmatrix/lapack.rb
214
+ - lib/nmatrix/lapack_core.rb
215
+ - lib/nmatrix/lapack_plugin.rb
232
216
  - lib/nmatrix/math.rb
233
217
  - lib/nmatrix/monkeys.rb
234
218
  - lib/nmatrix/nmatrix.rb
@@ -236,9 +220,6 @@ files:
236
220
  - lib/nmatrix/shortcuts.rb
237
221
  - lib/nmatrix/version.rb
238
222
  - lib/nmatrix/yale_functions.rb
239
- - nmatrix.gemspec
240
- - scripts/mac-brew-gcc.sh
241
- - scripts/mac-mavericks-brew-gcc.sh
242
223
  - spec/00_nmatrix_spec.rb
243
224
  - spec/01_enum_spec.rb
244
225
  - spec/02_slice_spec.rb
@@ -253,7 +234,7 @@ files:
253
234
  - spec/io/harwell_boeing_spec.rb
254
235
  - spec/io/test.rua
255
236
  - spec/io_spec.rb
256
- - spec/lapack_spec.rb
237
+ - spec/lapack_core_spec.rb
257
238
  - spec/leakcheck.rb
258
239
  - spec/math_spec.rb
259
240
  - spec/nmatrix_yale_resize_test_associations.yaml
@@ -278,10 +259,12 @@ post_install_message: |
278
259
  with GCC 4.6+. We are happy to accept contributions
279
260
  which improve the portability of this project.
280
261
 
281
- Also required is ATLAS. Most Linux distributions and Mac
282
- versions include ATLAS, but you may wish to compile it
283
- yourself. The Ubuntu/Debian apt package for ATLAS WILL
284
- NOT WORK with NMatrix if LAPACK is also installed.
262
+ If you are upgrading from NMatrix 0.1.0 and rely on
263
+ ATLAS features, please check the README.
264
+
265
+ Faster matrix calculations and more advanced linear
266
+ algebra features are available by installing either
267
+ the nmatrix-atlas or nmatrix-lapacke plugins.
285
268
 
286
269
  More explicit instructions for NMatrix and SciRuby should
287
270
  be available on the SciRuby website, sciruby.com, or
@@ -306,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
289
  version: '0'
307
290
  requirements: []
308
291
  rubyforge_project:
309
- rubygems_version: 2.2.0
292
+ rubygems_version: 2.4.5
310
293
  signing_key:
311
294
  specification_version: 4
312
295
  summary: NMatrix is a linear algebra library for Ruby
@@ -315,26 +298,16 @@ test_files:
315
298
  - spec/01_enum_spec.rb
316
299
  - spec/02_slice_spec.rb
317
300
  - spec/03_nmatrix_monkeys_spec.rb
318
- - spec/2x2_dense_double.mat
319
- - spec/4x4_sparse.mat
320
- - spec/4x5_dense.mat
321
301
  - spec/blas_spec.rb
322
302
  - spec/elementwise_spec.rb
323
303
  - spec/homogeneous_spec.rb
324
304
  - spec/io/fortran_format_spec.rb
325
305
  - spec/io/harwell_boeing_spec.rb
326
- - spec/io/test.rua
327
306
  - spec/io_spec.rb
328
- - spec/lapack_spec.rb
329
- - spec/leakcheck.rb
307
+ - spec/lapack_core_spec.rb
330
308
  - spec/math_spec.rb
331
- - spec/nmatrix_yale_resize_test_associations.yaml
332
309
  - spec/nmatrix_yale_spec.rb
333
- - spec/rspec_monkeys.rb
334
310
  - spec/rspec_spec.rb
335
311
  - spec/shortcuts_spec.rb
336
312
  - spec/slice_set_spec.rb
337
- - spec/spec_helper.rb
338
313
  - spec/stat_spec.rb
339
- - spec/test.pcd
340
- - spec/utm5940.mtx
data/.gitignore DELETED
@@ -1,27 +0,0 @@
1
- .idea
2
- Gemfile.lock
3
- ext/nmatrix/dense/daxpy.c
4
- ext/nmatrix/dense/dgeco.c
5
- ext/nmatrix/dense/dgefa.c
6
- ext/nmatrix/dense/dgemm.c
7
- ext/nmatrix/dense/dgemv.c
8
- ext/nmatrix/dense/dscal.c
9
- ext/nmatrix/dense/idamax.c
10
- ext/nmatrix/dense/467.c
11
- ext/nmatrix/dense/*.f
12
- ext/nmatrix/dense/transpose.txt
13
- ext/nmatrix/yale/aicm.tex
14
- tmp/
15
- test.c
16
- spec/*.mtx
17
- *.so
18
- *.bundle
19
- *.bundle.dSYM
20
- *.log
21
- /tags
22
- *.gem
23
- html/
24
- doc/
25
- docs/
26
- pkg/
27
- .autotest
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format RSpec::Longrun::Formatter
@@ -1,15 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- env:
4
- - CPLUS_INCLUDE_PATH=/usr/include/atlas C_INCLUDE_PATH=/usr/include/atlas
5
- rvm:
6
- - "1.9.3"
7
- - "2.0.0"
8
- - "2.1.0"
9
- - "2.1.1"
10
- before_install:
11
- - sudo apt-get update -qq
12
- - sudo apt-get install -qq libatlas-base-dev
13
- script: bundle exec rake compile && bundle exec rake spec
14
- notifications:
15
- irc: "chat.freenode.net#sciruby"
@@ -1,82 +0,0 @@
1
- NMatrix is part of SciRuby, a collaborative effort to bring scientific computation to Ruby. If you want to help, please
2
- do so!
3
-
4
- This guide covers ways in which you can contribute to the development of SciRuby and, more specifically, NMatrix.
5
-
6
- ## How to help
7
-
8
- There are various ways to help NMatrix: bug reports, coding and documentation. All of them are important.
9
-
10
- First, you can help implement new features or bug fixes. To do that, visit our
11
- [roadmap](https://github.com/SciRuby/nmatrix/wiki/Roadmap) or our [issue tracker][2]. If you find something that you
12
- want to work on, post it in the issue or on our [mailing list][1].
13
-
14
- You need to send tests together with your code. No exceptions. You can ask for our opinion, but we won't accept patches
15
- without good spec coverage.
16
-
17
- We use RSpec for testing. If you aren't familiar with it, there's a good
18
- [guide to better specs with RSpec](http://betterspecs.org/) that shows a bit of the syntax and how to use it properly.
19
- However, the best resource is probably the specs that already exist -- so just read them.
20
-
21
- And don't forget to write documentation (we use RDoc). It's necessary to allow others to know what's available in the
22
- library. There's a section on it later in this guide.
23
-
24
- We only accept bug reports and pull requests in GitHub. You'll need to create a new (free) account if you don't have one
25
- already. To learn how to create a pull request, please see
26
- [this guide on collaborating](https://help.github.com/categories/63/articles).
27
-
28
- If you have a question about how to use NMatrix or SciRuby in general or a feature/change in mind, please ask the
29
- [sciruby-dev mailing list][1].
30
-
31
- Thanks!
32
-
33
- ## Coding
34
-
35
- To start helping with the code, you need to have all the dependencies in place:
36
-
37
- - ATLAS and LAPACK
38
- - GCC 4.3+
39
- - git
40
- - Ruby 1.9+
41
- - `bundler` gem
42
-
43
- Now, you need to clone the git repository:
44
-
45
- ```bash
46
- $ git clone git://github.com/SciRuby/nmatrix.git
47
- $ cd nmatrix
48
- $ bundle install
49
- $ rake compile
50
- $ rake spec
51
- ```
52
-
53
- This will install all dependencies, compile the extension and run the specs.
54
-
55
- If everything's fine until now, you can create a new branch to work on your feature:
56
-
57
- ```bash
58
- $ git branch new-feature
59
- $ git checkout new-feature
60
- ```
61
-
62
- Before commiting any code, please read our
63
- [Contributor Agreement](http://github.com/SciRuby/sciruby/wiki/Contributor-Agreement).
64
-
65
- ## Documentation
66
-
67
- There are two ways in which NMatrix is being documented: guides and comments, which are converted with RDoc into the
68
- documentation seen in [sciruby.com](http://sciruby.com).
69
-
70
- If you want to write a guide on how to use NMatrix to solve some problem or simply showing how to use one of its
71
- features, write it as a wiki page and send an e-mail on the [mailing list][1]. We're working to improve this process.
72
-
73
- If you aren't familiar with RDoc syntax,
74
- [this is the official documentation](http://docs.seattlerb.org/rdoc/RDoc/Markup.html).
75
-
76
- ## Conclusion
77
-
78
- This guide was heavily based on the
79
- [Contributing to Ruby on Rails guide](http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html).
80
-
81
- [1]: https://groups.google.com/forum/?fromgroups#!forum/sciruby-dev
82
- [2]: https://github.com/sciruby/nmatrix/issues?sort=created&state=open
data/Gemfile DELETED
@@ -1,2 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
@@ -1,677 +0,0 @@
1
- === 0.0.1 / 2012-04-10
2
-
3
- * 1 major enhancement
4
-
5
- * Initial alpha release
6
-
7
- === 0.0.2 / 2012-09-21
8
-
9
- * 15 major enhancements
10
-
11
- * Second alpha release
12
-
13
- * Rewrote NMatrix in C++0x and C++11 using templates, namespaces;
14
- removed Ruby generators and CAST parser
15
-
16
- * Added preliminary C API
17
-
18
- * Slicing and referencing support for dense and list matrices (by
19
- @flipback)
20
-
21
- * BLAS level-3 xTRSM algorithm added for rationals and BLAS types
22
-
23
- * LAPACK support added, including partially working xGETRF
24
- subroutine
25
-
26
- * Element-wise comparisons now return byte-matrices
27
-
28
- * Element-wise operations on list matrices may alter the default
29
- value of the return matrix
30
-
31
- * Element-wise division behaves like Ruby division
32
-
33
- * Improved MATLAB .MAT v5 file reading
34
-
35
- * clang support
36
-
37
- * `==` operator now used for matrix equality, `=~` and `!~` for
38
- element-wise comparisons
39
-
40
- * Dense `each` returns an Enumerator when called without a block
41
-
42
- * Sped up list storage item deletion, fixed bugs
43
-
44
- * List matrix-to-hash conversion with `to_h`
45
-
46
- * Note: Element-wise list operations current disabled
47
-
48
- === 0.0.3 / 2013-01-18
49
-
50
- * 8 major enhancements
51
-
52
- * Matrix-scalar operations (dense, list)
53
-
54
- * Shortcuts for matrix creation (by @agarie)
55
-
56
- * Access to most ATLAS-implemented LAPACK functions for those
57
- with ATLAS' CLAPACK interface: xGETRF, xGETRI, xGETRS, xGESV,
58
- xPOTRF, xPOTRI, xPOTRS, xPOSV, xLASWP, xSCAL, xLAUUM
59
-
60
- * Access to additional ATLAS-implemented BLAS functions: xTRMM,
61
- xSYRK, xHERK, xROT, xROTG
62
-
63
- * Non-ATLAS versions of CLAPACK functions: xLASWP, xSCAL, xLAUUM,
64
- xROT
65
-
66
- * Matrix inversion (LU and Cholesky; requires CLAPACK)
67
-
68
- * LU factoring with and without CLAPACK
69
-
70
- * Native matrix I/O for dense (supporting upper, lower, hermitian,
71
- skew, symmetric, and general) and yale (general only); excludes
72
- Ruby objects currently
73
-
74
- * 2 bug fixes:
75
-
76
- * Yale-to-list casting
77
-
78
- * Now requires packable-1.3.5 or higher, fixing a problem with
79
- MATLAB .mat v5 file I/O (specific to doubles)
80
-
81
- === 0.0.4 / 2013-05-17
82
-
83
- * 3 major enhancements
84
-
85
- * Added a more user-friendly interface for cblas_rot in the form of
86
- NMatrix::BLAS::rot
87
-
88
- * Added to_hash for Yale matrices
89
-
90
- * Improved source code documentation (by @agarie)
91
-
92
- * 4 minor enhancements
93
-
94
- * Spec clean-up (by @masaomi)
95
-
96
- * Made it possible to request a different itype internally for Yale
97
- matrices
98
-
99
- * Improved space usage of Yale slice-by-copying, which was
100
- requesting more space than needed
101
-
102
- * Improved compile-time Mac OS X and Ubuntu library searching
103
-
104
- * 8 bug fixes:
105
-
106
- * NMatrix::BLAS::gemv segfaults
107
-
108
- * Fixed Yale matrix slice-by-copy write error where default itypes
109
- (which are based on shape) differ, and a separate problem where
110
- incorrect IJA and A entries were written.
111
-
112
- * NVector-scalar operations and NVector-NVector element-wise
113
- options now return an NVector instead of an NMatrix
114
-
115
- * Addressed problems with segmentation faults during iteration (by
116
- @cjfuller)
117
-
118
- * Addressed Ubuntu/Debian installation problems (incompatibility
119
- with apt-supplied atlas)
120
-
121
- * Fixed transpose behavior following slice-by-reference (by
122
- @cjfuller)
123
-
124
- * Fixed gem install command in Rakefile (by @jpmckinney)
125
-
126
- * Fixed Spanish language compile issue (by @imcsk8 and @agarie)
127
-
128
- === 0.0.5 / 2013-07-09
129
-
130
- * 4 major enhancements
131
-
132
- * NVector orientation is now controlled by its shape, not by the
133
- @orientation property
134
-
135
- * NVector default orientation is now a row vector rather than a
136
- column, as this is more efficient for Yale storage
137
-
138
- * NVector objects may now be created with dtypes other than dense
139
-
140
- * Exposure of additional ATLAS-implemented BLAS functions,
141
- including native rational and Ruby object support, for xANUM (sum
142
- of the absolute values of a vector) and xNRM2 (2-norm of a
143
- vector); and Ruby helper functions BLAS::anum and BLAS::nrm2
144
- which should do more careful argument sanity checking
145
-
146
- * 9 minor enhancements
147
-
148
- * Added #yale_vector_insert to NMatrix::YaleFunctions, to speed up
149
- insertion of multiple items into a Yale matrix
150
-
151
- * Added #yale_nd_row, #yale_nd_row_as_hash, #yale_nd_row_as_array,
152
- #yale_nd_row_as_set, #yale_nd_row_as_sorted_set, #yale_row,
153
- #yale_row_as_hash, #yale_row_as_array, #yale_row_as_set,
154
- #yale_row_as_sorted_set, #yale_nd_row_size to
155
- NMatrix::YaleFunctions in order to speed up getting multiple
156
- items from some row of a Yale matrix
157
-
158
- * Improved #yale_ija, #yale_a, #yale_d by allowing an optional
159
- index argument, which returns a single array value instead of
160
- copying and returning the entire array
161
-
162
- * Improved sorting algorithm for Yale matrix multiplication;
163
- instead of selection sort, now uses quicksort; and subs in
164
- insertion sort for small partitions
165
-
166
- * Slicing a single row or column now returns an NVector instead
167
- of an NMatrix (does not yet work for n-dimensional matrices)
168
-
169
- * Improved function documentation for NVector and NMatrix
170
-
171
- * Added #min, #max, #to_a, #shuffle, #shuffle!, #absolute_sum,
172
- #norm2 functions to NVector
173
-
174
- * Aliased missing dimension of NVector#each_stored_with_indices to
175
- #each_stored_with_index, which only yields a value and i or j
176
- (not both i and j) depending on the vector orientation
177
-
178
- * Added #each_row, #each_column to NMatrix
179
-
180
- * 5 bug fixes:
181
-
182
- * Dense iterators now return self (an NMatrix) in order to be
183
- consistent with Ruby Array behavior (by @cjfuller)
184
-
185
- * Fixed Yale resize problem (by @v0dro)
186
-
187
- * Fixed Yale nx1 times 1xn multiplication problem
188
-
189
- * Fixed Yale sorting-following-multiplication problem
190
-
191
- * NMatrix::read() now raises an exception when asked to read a file
192
- that does not exist
193
-
194
- === 0.0.6 / 2013-08-09
195
-
196
- * 8 major enhancements:
197
-
198
- * Refactored iteration, so that each storage type now has each of:
199
- #each, #each_with_indices, #each_stored_with_indices
200
-
201
- * Added element-wise power function (**) for dense matrices (by
202
- @agarie)
203
-
204
- * Dramatically improved matrix element-wise and scalar functions so
205
- C++ templates are no longer necessary; element-wise operations
206
- may now be written in protected Ruby methods that look like
207
- NMatrix#__list_elementwise_op__ and NMatrix#__list_scalar_op__
208
-
209
- * Element-wise and scalar operations that might return a true or
210
- false now return Ruby matrices
211
-
212
- * Yale element-wise and scalar operations have been added
213
-
214
- * Yale is now allowed to have a non-zero default (specifically to
215
- permit true-false matrices and nil sparse bases)
216
-
217
- * Dramatically improved NMatrix#cast to allow for hashed options
218
- including a :default for list and yale casts
219
-
220
- * Dramatically improved speed of compilation
221
-
222
- * 14 minor enhancements:
223
-
224
- * Improved documentation for exposed BLAS and LAPACK functions
225
-
226
- * Allowed for use of BLAS::rot without cloning x and y (in-place
227
- plane rotation); removed unnecessary test of unfriendly version
228
-
229
- * Added more user-friendly cblas_xrotg implementation: BLAS::rotg
230
-
231
- * Moved NMatrix::YaleFunctions::yale_vector_insert to
232
- NMatrix#__yale_vector_set__, which is more consistent with
233
- behavior
234
-
235
- * Changed notations for protected stype-specific functions, which
236
- now look like __stype_method_name__, e.g., __yale_vector_set__
237
-
238
- * Added NMatrix#__list_default_value__ protected function to get
239
- the initial (sparse) value for list matrices
240
-
241
- * Changed behavior and names of NMatrix::YaleFunctions methods
242
- which get column indices and cell contents by row, so that they
243
- now expect the :keys option (like Hash#keys) instead of :array,
244
- which doesn't make sense; name changes are as follows:
245
- yale_row_as_sorted_set -> yale_ja_d_keys_sorted_set_at
246
- yale_row_as_set -> yale_ja_d_keys_set_at
247
- yale_row_as_array -> yale_ja_d_keys_at
248
- yale_nd_row_as_sorted_set -> yale_ja_sorted_set_at
249
- yale_nd_row_as_set -> yale_ja_set_at
250
- yale_nd_row_as_array -> yale_ja_at
251
- Aliases are included but will be removed without notice.
252
-
253
- * Added NVector#sorted_indices and #binned_sorted_indices for use
254
- when running k-nearest neighbor searches on a distance matrix
255
-
256
- * Added NVector::logspace shortcut function (analogous to
257
- NVector::linspace)
258
-
259
- * Cleaned up code by removing monkey patches that we stopped using
260
- circa v0.0.2 (Array#min, Array#max, String#constantize,
261
- String#camelize, String#underscore)
262
-
263
- * Re-enabled element-wise mod (%) method
264
-
265
- * Added NMatrix::guess_dtype class method, which allows you to
266
- figure out what dtype (roughly) should be used for any given
267
- Ruby value (e.g., 3)
268
-
269
- * String and nil objects in NMatrix cells are no longer outlawed
270
- (but are not supported), provided they are of the :object dtype
271
-
272
- * NMatrix#diag shortcut for specifying sparse matrix with a user-
273
- specified diagonal array (by @ryanmt)
274
-
275
- * 3 bug fixes:
276
-
277
- * Corrected BLAS::rot bounds checking on optional n argument
278
-
279
- * Removed BLAS::rotg and BLAS::nrm2 code for rational numbers, as
280
- both involve a square root
281
-
282
- * Repaired list matrix element-wise functions
283
-
284
- === 0.0.7 / 2013-08-22
285
-
286
- * 6 major enhancements:
287
-
288
- * Eliminated NVector in favor of NMatrix objects with
289
- #effective_dim smaller than #dim; added NVector-like
290
- functionality to NMatrix, sometimes with #respond_to? dependent
291
- upon matrix dimensions; allowed for NVector.new to continue
292
- to function as before, but now returns an NMatrix instead
293
-
294
- * Began major re-factoring of headers for math.cpp
295
-
296
- * Added two singular value decomposition functions for dense
297
- NMatrix objects, #gesvd and #gesdd, for floating point and
298
- complex dtypes
299
-
300
- * Added additional slicing shorthand, which uses hashes (e.g.,
301
- n[0=>3,2] for n[0..3,2]), which may eventually allow users to use
302
- n[0:3,2] notation instead (needs Ruby core patch)
303
-
304
- * #[] and #[]= calls no longer need index on those matrix shape
305
- elements which are equal to 1 (e.g., vectors)
306
-
307
- * Yale slicing-by-reference has been added
308
-
309
- * 18 minor enhancements:
310
-
311
- * Added user-friendly NMatrix::LAPACK::laswp method
312
-
313
- * Added NMatrix#permute_columns! and NMatrix#permute_columns
314
-
315
- * Added NMatrix#abs to compute element-wise absolute values, and
316
- #abs_dtype to determine the dtype returned by a call to #abs on a
317
- given matrix (needed for RSpec)
318
-
319
- * Added NMatrix#size to compute the total number of cells in an
320
- NMatrix object (solely accounting for the shape, not sparsity)
321
-
322
- * Added RSpec monkey patches for #be_within to work with NMatrix
323
- objects; usable by requiring "nmatrix/rspec"
324
-
325
- * Added experimental NMatrix::LAPACK::lapack_gesvd function (which
326
- does NOT depend upon CLAPACK) (by @ryanmt and @mohawkjohn)
327
-
328
- * Added experimental non-LAPACK-dependent function
329
- NMatrix::LAPACK::lapack_gesdd
330
-
331
- * Added NMatrix#supershape method for getting the shape of a
332
- slice's parent or other ancestor, which may be useful for calling
333
- ATLAS and LAPACK functions on slices
334
-
335
- * Aliased NMatrix[] to function like N[] shortcut for matrix
336
- creation (by @agarie)
337
-
338
- * Added #layer for matrices with dimension greater than two
339
- (corresponds to #row and #column)
340
-
341
- * Added #rank and #each_rank generics for #row/#column/#layer and
342
- #each_row/#each_column/#each_layer respectively (#each_rank
343
- replaces #each_along_dim)
344
-
345
- * Replaced #reduce_along_dim with #inject_rank
346
-
347
- * NMatrix#to_a now works for up to two dimensional matrices; and
348
- returns a flattened array for single-row matrices
349
-
350
- * NMatrix#to_flat_a now returns a flattened array of all entries
351
-
352
- * Re-organized NMatrix Ruby sources into multiple files: math.rb
353
- for instance methods which are mathematical in nature or are
354
- essentially ATLAS/LAPACK/BLAS calls, enumerate.rb for methods
355
- involving enumeration; and existing shortcuts.rb for convenience
356
- functions and shortcut constructors, and nmatrix.rb for core
357
- functionality (#inspect, #to_h, #to_a, #to_s, #pretty_print,
358
- and so on)
359
-
360
- * Improved #pretty_print, which now also prints layers (the third
361
- dimension in a 3D matrix)
362
-
363
- * Re-factored some of dense slicing to remove some redundant code
364
-
365
- * Added shortcut functions #list?, #dense?, #yale? for quickly
366
- testing matrix storage type
367
-
368
- * 5 bug fixes:
369
-
370
- * Fixed compilation problem involving <typeinfo> and <vector> STL
371
- headers
372
-
373
- * Fixed NMatrix#inverse problem with non-square matrices
374
-
375
- * Fixed invalid read problem detected by Valgrind for
376
- Yale element-wise subtraction in spec
377
-
378
- * Fixed conversion from Ruby object to Complex and Rational
379
-
380
- * Fixed memory leak in slicing
381
-
382
- === 0.0.8 / 2013-08-23
383
-
384
- * 2 bug fixes:
385
-
386
- * Fixed Ubuntu compilation bug caused by math header file
387
- refactoring
388
-
389
- * Fixed pry version error which manifests on some systems but not
390
- others
391
-
392
- === 0.0.9 / 2013-09-18
393
-
394
- * 5 major enhancements:
395
-
396
- * Re-factored NMatrix constructor
397
-
398
- * Improved usability of NMatrix shortcut constructor options
399
- (e.g., #zeros, #ones, #random, etc.) using new NMatrix
400
- constructor
401
-
402
- * Left-assignment of slices for all matrix storage types (uses a
403
- dense cast, or accepts an array or single value)
404
-
405
- * Re-factored Yale into a more object-oriented and less confusing
406
- set of header files
407
-
408
- * Enabled Travis CI (by @cjfuller)
409
-
410
- * 4 minor enhancements:
411
-
412
- * Renamed some specs in order to change their test order, so that
413
- critical tests fail first (particularly in the case of
414
- segmentation faults)
415
-
416
- * Default dtype is now :object when no initial values are
417
- specified
418
-
419
- * Deprecated NVector#initialize and a number of other unnecessary
420
- NVector functionality
421
-
422
- * Made Ubuntu compilation significantly easier (by @cjfuller)
423
-
424
- * 2 bug fixes:
425
-
426
- * nil values in matrices are now pretty printed as "nil"
427
-
428
- * Casting from dense to Yale now properly accepts the default
429
- value option
430
-
431
- === 0.1.0.rc1 / 2013-12-28
432
-
433
- * 4 major enhancements:
434
-
435
- * Improved garbage collection strategy for partial object creation
436
- (i.e., when VALUEs are allocated but not registered right away),
437
- which in addition to fixing numerous bugs should prevent some new
438
- bugs from arising in the future (by @cjfuller)
439
-
440
- * Implemented list storage transpose
441
-
442
- * Implemented generic n-dimensional transpose
443
-
444
- * Implemented == comparison between differing matrix stypes
445
-
446
- * 9 minor enhancements:
447
-
448
- * User-friendly #gesvd and #gesdd updates (by @ryanmt)
449
-
450
- * Added experimental #yale_row_key_intersection function for expert
451
- recommendation problems
452
-
453
- * Added additional *indgen shortcuts and changed behavior for some;
454
- now, #cindgen for :complex64, #zindgen for :complex128, #findgen
455
- for :float32, #dindgen for :float64, #rindgen for :rational128,
456
- and #rbindgen for Ruby objects (which contain integers); also,
457
- removed code repetition
458
-
459
- * Changed #stddev to use elementwise #sqrt instead of a manual map
460
- block (by @cjfuller)
461
-
462
- * Added alias from MATLAB `load_mat` method to `load` for
463
- consistency with the MatrixMarket loader
464
-
465
- * Improved organization by moving list and yale code into storage/
466
- subdirectories
467
-
468
- * Added NMatrix#potrf! and NMatrix#getrf, which are instance methods
469
- for calling CLAPACK functions (NMatrix#getrf! already existed)
470
-
471
- * Added GCC installation instructions for Mac OS X Mavericks, and
472
- updated the old installation instructions for Mac OS X (both
473
- found in scripts/)
474
-
475
- * Switched NMatrix::VERSION to work more like Rails::VERSION, with
476
- support for MAJOR, MINOR, TINY, and PRE
477
-
478
- * Added #concat, #hconcat, #vconcat, and #dconcat for joining
479
- matrices together
480
-
481
- * 16 bug fixes:
482
-
483
- * Spec revisions for lapack_gesdd and lapack_gesvd (by @ryanmt)
484
-
485
- * Fixed two double-free problems (by @cjfuller and @mohawkjohn)
486
-
487
- * Fixed contiguous array marking fencepost error
488
-
489
- * Fixed C/C++ API compatibility problem preventing rb/gsl linking
490
-
491
- * Resolved a number of compiler warnings, including one return-type
492
- problem that would likely have become a garbage collection error
493
- (if it wasn't already)
494
-
495
- * Fixed -O3 optimization problems
496
-
497
- * Restored NMatrix#asum, #nrm2, #binned_sorted_indices,
498
- #sorted_indices which were inadvertantly removed by NVector
499
- deprecation; have not tested
500
-
501
- * Experimental #yale_nd_row and functions which call it now checks
502
- range of argument to prevent segfault
503
-
504
- * Fixed :* shortcut for a full list dimension (by @cjfuller)
505
-
506
- * Fixed list construction problem which occurred when an initial
507
- value array was provided (by @cjfuller)
508
-
509
- * Fixed #inject issue with list and yale matrices of two dimensions
510
- (by @cjfuller)
511
-
512
- * Fixed several garbage collection problems (also listed under
513
- enhancements) (by @cjfuller)
514
-
515
- * Updated object cleaning target in extconf.rb
516
-
517
- * Fixed possible compilation problem on Mavericks with Xcode 5.02
518
-
519
- * Fixed errors involving undefined symbols, unresolved symbols, and
520
- lazy symbol binding
521
-
522
- * Improved LAPACK and BLAS header selection for Ubuntu/Debian
523
- systems with ATLAS (by @mvz)
524
-
525
- === 0.1.0.rc2 / 2014-03-12
526
-
527
- * No major enhancements.
528
-
529
- * 14 minor enhancements:
530
-
531
- * Implemented negative-index slicing (by @rajatkapoor)
532
-
533
- * Added reader for Point Cloud Library's PCD format
534
-
535
- * Added Ruby 2.1 support (including Travis CI testing)
536
-
537
- * Implemented LAPACK-independent exact inverse calculation for
538
- dense matrices of size 2x2 and 3x3, as well as
539
-
540
- * Added NMatrix::has_clapack? method to determine whether CLAPACK
541
- support has been compiled in
542
-
543
- * Improved conformance of specs to RSpec best practices (by
544
- @duggiefresh)
545
-
546
- * Travis CI now updates the IRC channel when a check passes (by
547
- @agarie)
548
-
549
- * Added NMatrix#data_pointer, which returns the memory address of
550
- the stored elements in a matrix (generally for use with FFI and
551
- other libraries that need pointers)
552
-
553
- * Made NMatrix#clone_structure a public method (was protected)
554
-
555
- * Added :scale option for NMatrix::random to handle non-floating
556
- point forms
557
-
558
- * Added complex support to NMatrix::random
559
-
560
- * Aliased NMatrix::random to NMatrix::rand
561
-
562
- * Added NMatrix#reshape! for in-place reshape of dense matrices (by
563
- @rajatkapoor)
564
-
565
- * Implemented unary negation of matrices
566
-
567
- * 6 bug fixes:
568
-
569
- * Fixed dot product operation on 1-dimensional matrices (by @rve
570
- and @cjfuller)
571
-
572
- * Fixed segfault on 1-dimensional matrix transpose (by @cjfuller)
573
-
574
- * Fixed compile error with Ruby 2.1 (by @diminish7)
575
-
576
- * Fixed regression which wasn't causing any problems but was
577
- counter to design: stride was declared prior to data storage for
578
- dense matrix storage
579
-
580
- * Fixed Rakefile problem which was causing specs to run twice in a
581
- row with each call to rake spec
582
-
583
- * NMatrix::random now raises an exception when rational matrices
584
- are requested
585
-
586
- === 0.1.0.rc3 / 2014-03-27
587
-
588
- * No major enhancements.
589
-
590
- * 2 minor enhancements:
591
-
592
- * Exposed NMatrix::LAPACK::geev for LAPACK's xGEEV
593
-
594
- * Added out-of-place complex conjugate for dense and yale storage
595
- (by @rve)
596
-
597
- * 1 bug fixes:
598
-
599
- * Fixed critical bug with transposing a matrix reference slice (by
600
- @rajatkapoor)
601
-
602
- === 0.1.0.rc4 / 2014-07-24
603
-
604
- * No major enhancements.
605
-
606
- * 1 minor enhancement:
607
-
608
- * NMatrix#floor and #ceil implemented (by @v0dro)
609
-
610
- * 2 bug fixes:
611
-
612
- * Disallowed out-of-bounds rank calls (by @andrewcsmith)
613
-
614
- * Fixed rspec 3.0 conflict with rspec-longrun 1.0.1
615
-
616
- === 0.1.0.rc5 / 2014-08-01
617
-
618
- * No major enhancements.
619
-
620
- * 1 minor enhancements:
621
-
622
- * Added optional extension for generating homogeneous
623
- transformation matrices for rotations and translations in three
624
- dimensions
625
-
626
- * 3 bug fixes:
627
-
628
- * Fixed rake install (by @duggiefresh)
629
-
630
- * Fixed API problems which prevented NMatrix from working with
631
- the SciRuby rb-gsl fork
632
-
633
- * Fixed Yale #inject behavior (by @yoongkang)
634
-
635
- === 0.1.0 / 2014-12-11
636
-
637
- * 3 major enhancements:
638
-
639
- * Updated to BSD 3-clause license
640
-
641
- * Removed Ruby 1.9.2 support; now requires Ruby 1.9.3 or
642
- higher (by @v0dro)
643
-
644
- * Added Gauss-Jordan elimination for calculation of
645
- matrix inverses (by @v0dro)
646
-
647
- * 6 minor enhancements:
648
-
649
- * Added trace method for square matrices
650
-
651
- * Improved Array#to_nm monkey patch so matrices and
652
- arrays can be interconverted easily, without need for a
653
- shape argument (by @andrewcsmith)
654
-
655
- * Added Harwell-Boeing and Fortran matrix format parsers
656
- (by @v0dro)
657
-
658
- * Removed soon-to-be-deprecated autoloads and replaced
659
- with a more robust method (by @duggiefresh)
660
-
661
- * Updated rake install task to use Bundler's GemHelper
662
- install task (by @duggiefresh)
663
-
664
- * Moved packable requirement from Gemfile to gemspec
665
- (by @andrewcsmith)
666
-
667
- * 3 bug fixes:
668
-
669
- * Corrected Ubuntu clapack functionality checking, which
670
- should fix most functions which rely on the ATLAS
671
- version of clapack
672
-
673
- * Corrected NMatrix::gesdd workspace request size (by
674
- @yoongkang)
675
-
676
- * Fixed definition of NMatrix#asum for one-by-one
677
- matrices (by @andrewcsmith)