[Top][All Lists]

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

Re: [Bug-gsl] an error

From: Andrew Benson
Subject: Re: [Bug-gsl] an error
Date: Wed, 10 Jun 2015 13:28:50 -0700
User-agent: KMail/4.14.7 (Linux/4.0.4-303.fc22.x86_64; KDE/4.14.8; x86_64; ; )

On Wednesday, June 10, 2015 11:32:52 PM 方仁洪 wrote:
> 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:
Try adding:

#include <gsl/gsl_permute_vector.h>

#include <stdio.h>
#include <gsl/gsl_permutation.h>
#include <gsl/gsl_permute_vector.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]);
return 0;


* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html

* Galacticus: http://sites.google.com/site/galacticusmodel

reply via email to

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