Combinations ↑

Contents:

  1. Combination allocation

  2. Methods

    1. Accessing combination elements

    2. Combination properties

    3. Combination functions

    4. Reading and writing combinations

Combination allocation ↑



Methods ↑



Accessing combination elements ↑


Combination properties ↑






Combination functions ↑



Reading and writing combinations ↑


Example ↑

#!/usr/bin/env ruby
require("gsl")

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

prev next

Reference index top