/usr/share/doc/ruby-gsl/examples/histogram/histogram.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 19 20 21 22 23 24 25 | #!/usr/bin/env ruby
require("gsl")
h = GSL::Histogram.alloc(5)
p h
p h.size
h.set_ranges([1, 5, 23, 45, 67, 89])
p h.range
h.set_ranges_uniform(0.0, 100)
p h.range
p h.get_range(3)
p h.max
p h.bins
p h.find(55)
#File.open("smp.dat") do |f|
# h.fscanf(f)
#end
h.fscanf("smp.dat")
p h.max_val
p h.max_bin
|