/usr/share/doc/ruby-gsl/examples/ntuple/create.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 | #!/usr/bin/env ruby
require("gsl")
v = GSL::Vector.alloc(3)
n = GSL::Ntuple.alloc("test.dat", v)
GSL::Rng.env_setup()
r = GSL::Rng.alloc
for i in 0...10000 do
for j in 0...3 do
v[j] = r.gaussian()
end
n.write
end
puts("Data file test.dat is created.")
puts("Try project.rb.")
|