bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] an error


From: 方仁洪
Subject: [Bug-gsl] an error
Date: Wed, 10 Jun 2015 23:32:52 +0800 (GMT+08:00)

Maybe I find an error.

It seems that the function "gsl_permute_vector" (in section Permutation 9.6)is 
not concluded in "gsl_permutation.h", because gcc compiler can not compile 
following programe:


#include <stdio.h>
#include <gsl/gsl_permutation.h>
#include <gsl/gsl_vector.h>
int main()
{  

    gsl_permutation *p = gsl_permutation_calloc(10);
    gsl_vector *v = gsl_vector_alloc(10);
    for(int i=0; i<10; i++) gsl_vector_set(v, i, i*i);
    gsl_permute_vector(p, v);
    for(int i=0; i<10; i++) printf("%f ", v->data[i]);

    gsl_permutation_free(p);
    gsl_vector_free(v);
    return 0;
}



Best regards!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]