nmatrix 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/History.txt +68 -2
- data/Manifest.txt +1 -0
- data/README.rdoc +8 -7
- data/Rakefile +13 -2
- data/ext/nmatrix/data/complex.h +19 -1
- data/ext/nmatrix/data/data.h +8 -0
- data/ext/nmatrix/data/ruby_object.h +1 -0
- data/ext/nmatrix/extconf.rb +6 -4
- data/ext/nmatrix/nmatrix.cpp +97 -35
- data/ext/nmatrix/nmatrix.h +2 -0
- data/ext/nmatrix/ruby_constants.cpp +11 -1
- data/ext/nmatrix/ruby_constants.h +6 -1
- data/ext/nmatrix/storage/dense.cpp +2 -2
- data/ext/nmatrix/storage/yale.cpp +303 -49
- data/ext/nmatrix/storage/yale.h +3 -0
- data/ext/nmatrix/util/math.cpp +112 -0
- data/ext/nmatrix/util/math.h +372 -72
- data/lib/nmatrix/blas.rb +55 -9
- data/lib/nmatrix/nmatrix.rb +315 -2
- data/lib/nmatrix/nvector.rb +156 -95
- data/lib/nmatrix/version.rb +1 -1
- data/lib/nmatrix/yale_functions.rb +112 -0
- data/spec/blas_spec.rb +11 -0
- data/spec/elementwise_spec.rb +4 -1
- data/spec/io_spec.rb +8 -0
- data/spec/lapack_spec.rb +37 -15
- data/spec/leakcheck.rb +16 -0
- data/spec/math_spec.rb +6 -2
- data/spec/nmatrix_spec.rb +209 -3
- data/spec/nmatrix_yale_spec.rb +55 -0
- data/spec/nvector_spec.rb +33 -14
- data/spec/slice_spec.rb +26 -17
- data/spec/spec_helper.rb +17 -0
- metadata +60 -45
- data/ext/nmatrix/new_extconf.rb +0 -55
data/ext/nmatrix/new_extconf.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
# = NMatrix
|
2
|
-
#
|
3
|
-
# A linear algebra library for scientific computation in Ruby.
|
4
|
-
# NMatrix is part of SciRuby.
|
5
|
-
#
|
6
|
-
# NMatrix was originally inspired by and derived from NArray, by
|
7
|
-
# Masahiro Tanaka: http://narray.rubyforge.org
|
8
|
-
#
|
9
|
-
# == Copyright Information
|
10
|
-
#
|
11
|
-
# SciRuby is Copyright (c) 2010 - 2012, Ruby Science Foundation
|
12
|
-
# NMatrix is Copyright (c) 2012, Ruby Science Foundation
|
13
|
-
#
|
14
|
-
# Please see LICENSE.txt for additional copyright notices.
|
15
|
-
#
|
16
|
-
# == Contributing
|
17
|
-
#
|
18
|
-
# By contributing source code to SciRuby, you agree to be bound by
|
19
|
-
# our Contributor Agreement:
|
20
|
-
#
|
21
|
-
# * https://github.com/SciRuby/sciruby/wiki/Contributor-Agreement
|
22
|
-
#
|
23
|
-
# == extconf.rb
|
24
|
-
#
|
25
|
-
# Configuration file for the NMatrix C/C++ extension.
|
26
|
-
|
27
|
-
require 'mkmf'
|
28
|
-
|
29
|
-
# Configure our compilers and compiler options.
|
30
|
-
$CFLAGS = '-I. -fPIC -Wall -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -mtune=native -O3'
|
31
|
-
CONFIG['CXXFLAGS'] = '-std=c++11'
|
32
|
-
|
33
|
-
if clang_path = find_executable('clang') and clang_pp_path = find_executable('clang++')
|
34
|
-
CONFIG['CC'] = clang_path
|
35
|
-
CONFIG['CXX'] = clang_pp_path
|
36
|
-
end
|
37
|
-
|
38
|
-
# Necessary header files.
|
39
|
-
find_header('ruby/config.h')
|
40
|
-
|
41
|
-
# List the source files that need to be compiled.
|
42
|
-
$srcs = [
|
43
|
-
# 'nmatrix.cpp',
|
44
|
-
'ruby_constants.cpp',
|
45
|
-
|
46
|
-
'data/data.cpp',
|
47
|
-
'math.cpp',
|
48
|
-
'storage/storage.cpp',
|
49
|
-
'storage/dense.cpp'
|
50
|
-
]
|
51
|
-
|
52
|
-
$objs = $srcs.map { |f| f.sub('.cpp', '.o') }
|
53
|
-
|
54
|
-
# Create the actual Makefile.
|
55
|
-
create_makefile('NMatrix')
|