/usr/share/doc/ruby-gsl/examples/combination.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 | #!/usr/bin/env ruby
require("gsl")
c = 0
printf("All subsets of {0,1,2,3} by size:\n") ;
for i in 0...4 do
c = GSL::Combination.calloc(4, i);
begin
printf("{");
c.fprintf(STDOUT, " %u");
printf(" }\n");
end while c.next == GSL::SUCCESS
end
p c
c2 = c.clone
p c2
a = c.data
p a.class
p a
p a.print
|