[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] permute vector
From: |
Frank Reininghaus |
Subject: |
Re: [Help-gsl] permute vector |
Date: |
Sun, 16 Mar 2008 14:24:54 +0100 |
User-agent: |
KMail/1.9.6 (enterprise 0.20070907.709405) |
Hi,
you have to add the following line to your code:
#include <gsl/gsl_permute_vector.h>
because the function gsl_permute_vector () is declared there. I couldn't find
this in the manual though - this should probably be fixed.
The return value 'int' is used in many GSL functions to tell the user if the
function call was successful (the constant GSL_SUCCESS is returned in this
case) or if the input data contained any error. The funcion
gsl_permute_vector () checks if the vector dimension matches the size of the
permutation (3 in your example). If this is not the case, the function calls
the error handler (either the default handler which prints an error message
and aborts the program or a user-defined one) and returns the error code
GSL_EBADLEN.
If you are sure that the input data are OK (or if you are happy with the
default error handler that aborts the program if they're not), you don't have
to check the return value.
The GSL manual contains quite a lot of examples. The source files are in the
directory doc/examples/ in the GSL source distribution.
I hope I could help you!
Cheers,
Frank