This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nmatrix' | |
b = NMatrix.new([4, 3], [1, 2, 3, 4, 5, 6, 7, 7, 7, 8, 9, 10]) | |
c = NMatrix.new([4, 3], stype: :yale, default: 0) | |
c[0,0] = 1 | |
c[1,1] = 2 | |
c[2,2] = 4 | |
c[3,2] = 8 | |
puts b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# call-seq: | |
# norm -> Numeric | |
# | |
# Calculates the selected norm (defaults to Frobenius norm) of a 2D matrix. | |
# | |
# This should be used for small or medium sized matrices. | |
# For greater matrices, there should be a separate implementation where | |
# the norm is estimated, not computed. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
have_library: checking for main() in -llapack... -------------------- yes | |
"gcc -o conftest -I/usr/include/ruby-1.9.1/x86_64-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -fno-strict-aliasing -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm -lc" | |
checked program was: | |
/* begin */ | |
1: #include "ruby.h" | |
2: | |
3: int main() {return 0;} | |
/* end */ |