Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / doc / examples / combination.c
1 #include <stdio.h>
2 #include <gsl/gsl_combination.h>
3
4 int 
5 main (void) 
6 {
7   gsl_combination * c;
8   size_t i;
9
10   printf ("All subsets of {0,1,2,3} by size:\n") ;
11   for (i = 0; i <= 4; i++)
12     {
13       c = gsl_combination_calloc (4, i);
14       do
15         {
16           printf ("{");
17           gsl_combination_fprintf (stdout, c, " %u");
18           printf (" }\n");
19         }
20       while (gsl_combination_next (c) == GSL_SUCCESS);
21       gsl_combination_free (c);
22     }
23
24   return 0;
25 }