File: permseq.c

package info (click to toggle)
gsl-doc 2.6-1
  • links: PTS
  • area: non-free
  • in suites: bullseye
  • size: 30,000 kB
  • sloc: ansic: 255,377; sh: 11,468; makefile: 1,134; python: 68
file content (21 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <gsl/gsl_permutation.h>

int
main (void) 
{
  gsl_permutation * p = gsl_permutation_alloc (3);

  gsl_permutation_init (p);

  do 
   {
      gsl_permutation_fprintf (stdout, p, " %u");
      printf ("\n");
   }
  while (gsl_permutation_next(p) == GSL_SUCCESS);

  gsl_permutation_free (p);

  return 0;
}