[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] error ?
From: |
Vander Alex |
Subject: |
[Bug-gsl] error ? |
Date: |
Thu, 30 Sep 2010 17:04:00 -0700 (PDT) |
code source:
#include <stdio.h>
#include <stdlib.h>
#include <gsl/gsl_combination.h>
#include <gsl/gsl_math.h>
#include <conio.h>
//-lgsl -lgslcblas
//LINKER
//LIGSL.DLL IN LIB
int
main (void)
{
gsl_combination * c;
size_t i;
printf("all subsets of {0,1,2,3} by size in lex. order\n") ;
for(i = 0; i <= 4; i++)
{
c = gsl_combination_calloc (4, i);
do
{
printf("{");
gsl_combination_fprintf (stdout, c, " %u");
printf(" }\n");
}
while (gsl_combination_next(c) == GSL_SUCCESS);
gsl_combination_free(c);
}
getch();
return 0;
}
output :
all subsets of {0,1,2,3} by size in lex. order
{ }
{ 0 }
{ 1 }
{ 2 }
{ 3 }
{ 0 1 }
{ 0 2 }
{ 0 3 }
{ 1 2 }
{ 1 3 }
{ 2 3 }
{ 0 1 2 }
{ 0 1 3 }
{ 0 2 3 }
{ 1 2 3 }
{ 0 1 2 3 }
where si { 0 1 3 2 } fro example ?????????
this is a bug ?
- [Bug-gsl] error ?,
Vander Alex <=