/usr/share/doc/ruby-gsl/examples/eigen/herm.rb is in ruby-gsl 2.1.0.3+dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env ruby
require("gsl")
include GSL::Eigen
m = GSL::Matrix::Complex.alloc(2, 2)
m.set(0, 1, [0, -1])
m.set(1, 0, [0, 1])
p m
val, vec = m.eigen_hermv
p val
p vec.unpack
m2 = GSL::Matrix.alloc([1, 0, 0], [0, 0, 1], [0, 1, 0])
val, vec = m2.eigen_symmv
p val
p vec.unpack
|