Break out POD to separate files for BLAS through Eigen
[Math-GSL.git] / swig / Errno.i
blob12eea7a6eaad8efa2bbd7a94ffc3a1f05b6ac31d
1 %module "Math::GSL::Errno"
2 %include "typemaps.i"
3 %include "gsl_typemaps.i"
4 %{
5 #include "gsl/gsl_errno.h"
6 #include "gsl/gsl_types.h"
7 %}
8 %include "gsl/gsl_errno.h"
9 %include "gsl/gsl_types.h"
11 %perlcode %{
12 @EXPORT_OK = qw/
13 gsl_error gsl_stream_printf gsl_strerror gsl_set_error_handler
14 gsl_set_error_handler_off gsl_set_stream_handler gsl_set_stream
15 $GSL_SUCCESS $GSL_FAILURE $GSL_CONTINUE $GSL_EDOM
16 $GSL_ERANGE $GSL_EFAULT $GSL_EINVAL $GSL_EFAILED
17 $GSL_EFACTOR $GSL_ESANITY $GSL_ENOMEM $GSL_EBADFUNC
18 $GSL_ERUNAWAY $GSL_EMAXITER $GSL_EZERODIV $GSL_EBADTOL
19 $GSL_ETOL $GSL_EUNDRFLW $GSL_EOVRFLW $GSL_ELOSS
20 $GSL_EROUND $GSL_EBADLEN $GSL_ENOTSQR $GSL_ESING
21 $GSL_EDIVERGE $GSL_EUNSUP $GSL_EUNIMPL $GSL_ECACHE
22 $GSL_ETABLE $GSL_ENOPROG $GSL_ENOPROGJ $GSL_ETOLF
23 $GSL_ETOLX $GSL_ETOLG $GSL_EOF
25 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
27 =head1 NAME
29 Math::GSL::Errno - Error Handling
31 =cut
33 =head1 SYNOPSIS
35 use Math::GSL::Errno qw/:all/;
36 gsl_set_error_handler_off();
38 print gsl_strerror($GSL_EDOM) . "\n";
40 =head1 STATUS CODES
42 =over 4
44 =item * $GSL_SUCCESS
46 Success
48 =item * $GSL_FAILURE
50 General Failure
52 =item * $GSL_CONTINUE
54 Iteration has not converged
56 =item * $GSL_EDOM
58 Domain error; used by mathematical functions when an argument value does not fall into the domain over which the function is defined (like EDOM in the C library)
60 =item * $GSL_ERANGE
62 Range error; used by mathematical functions when the result value is not representable because of overflow or underflow (like ERANGE in the C library)
64 =item * $GSL_EFAULT
66 Invalid Pointer
68 =item * $GSL_EINVAL
70 Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function (like EINVAL in the C library).Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function (like EINVAL in the C library).
72 =item * $GSL_EFAILED
74 Generic Failure
76 =item * $GSL_EFACTOR
78 Factorization Failed
80 =item * $GSL_ESANITY
82 Sanity Check Failed
84 =item * $GSL_ENOMEM
86 No memory available. The system cannot allocate more virtual memory because its capacity is full (like ENOMEM in the C library). This error is reported when a GSL routine encounters problems when trying to allocate memory with malloc.
88 =item * $GSL_EBADFUNC
90 Problem with user-supplied function
92 =item * $GSL_ERUNAWAY
94 Iterative process is our of control
96 =item * $GSL_EMAXITER
98 Exceeded max number of iterations
100 =item * $GSL_EZERODIV
102 Division by zero
104 =item * $GSL_EBADTOL
106 Invalid user-specified tolerance
108 =item * $GSL_ETOL
110 Failed to reach the specified tolerance
112 =item * $GSL_EUNDRFLW
114 Underflow
116 =item * $GSL_EOVRFLW
118 Overflow
120 =item * $GSL_ELOSS
122 Loss of accuracy
124 =item * $GSL_EROUND
126 Failed due to roundoff error
128 =item * $GSL_EBADLEN
130 Matrix/vector lengths not compatible
132 =item * $GSL_ENOTSQR
134 Not a square matrix
136 =item * $GSL_ESING
138 Singularity Detected
140 =item * $GSL_EDIVERGE
142 Integral/Series is divergent
144 =item * $GSL_EUNSUP
146 Not supported by hardware
148 =item * $GSL_EUNIMPL
150 Not implemented
152 =item * $GSL_ECACHE
154 Cache limit exceeded
156 =item * $GSL_ETABLE
158 Table limit exceeded
160 =item * $GSL_ENOPROG
162 Iteration not converging
164 =item * $GSL_ENOPROGJ
166 Jacobian not improving solution
168 =item * $GSL_ETOLF
170 Cannot reach tolerance in F
172 =item * $GSL_ETOLX
174 Cannot reach tolerance in X
176 =item * $GSL_ETOLG
178 Cannot reach tolerance in Gradient
180 =item * $GSL_EOF
182 End of file
184 =back
186 =head1 FUNCTIONS
188 =over
190 =item * gsl_error
192 =item * gsl_stream_printf
194 =item * gsl_strerror($gsl_errno) - This function returns a pointer to a string describing the error code gsl_errno. For example, print ("error: gsl_strerror ($status)\n"); would print an error message like error: output range error for a status value of GSL_ERANGE.
196 =item * gsl_set_error_handler
198 =item * gsl_set_error_handler_off() - This function turns off the error handler by defining an error handler which does nothing. This will cause the program to continue after any error, so the return values from any library routines must be checked. This is the recommended behavior for production programs. The previous handler is returned (so that you can restore it later).
200 =item * gsl_set_stream_handler
202 =item * gsl_set_stream
204 =back
206 =cut