# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.4
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

package Math::GSL::Errno;
use base qw(Exporter);
use base qw(DynaLoader);
package Math::GSL::Errnoc;
bootstrap Math::GSL::Errno;
package Math::GSL::Errno;
@EXPORT = qw();

# ---------- BASE METHODS -------------

package Math::GSL::Errno;

    my ($classname,$obj) = @_;
    return bless $obj, $classname;

sub CLEAR { }

sub FIRSTKEY { }

sub NEXTKEY { }

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";

sub this {
    my $ptr = shift;
    return tied(%$ptr);

# ------- FUNCTION WRAPPERS --------

package Math::GSL::Errno;

*gsl_error = *Math::GSL::Errnoc::gsl_error;
*gsl_stream_printf = *Math::GSL::Errnoc::gsl_stream_printf;
*gsl_strerror = *Math::GSL::Errnoc::gsl_strerror;
*gsl_set_error_handler = *Math::GSL::Errnoc::gsl_set_error_handler;
*gsl_set_error_handler_off = *Math::GSL::Errnoc::gsl_set_error_handler_off;
*gsl_set_stream_handler = *Math::GSL::Errnoc::gsl_set_stream_handler;
*gsl_set_stream = *Math::GSL::Errnoc::gsl_set_stream;

# ------- VARIABLE STUBS --------

package Math::GSL::Errno;

*GSL_EDOM = *Math::GSL::Errnoc::GSL_EDOM;
*GSL_ETOL = *Math::GSL::Errnoc::GSL_ETOL;
*GSL_ELOSS = *Math::GSL::Errnoc::GSL_ELOSS;
*GSL_ESING = *Math::GSL::Errnoc::GSL_ESING;
*GSL_ETOLF = *Math::GSL::Errnoc::GSL_ETOLF;
*GSL_ETOLX = *Math::GSL::Errnoc::GSL_ETOLX;
*GSL_ETOLG = *Math::GSL::Errnoc::GSL_ETOLG;
*GSL_EOF = *Math::GSL::Errnoc::GSL_EOF;

@EXPORT_OK = qw/
                gsl_error gsl_stream_printf gsl_strerror gsl_set_error_handler
                gsl_set_error_handler_off gsl_set_stream_handler gsl_set_stream
                $GSL_ETOLX $GSL_ETOLG $GSL_EOF
%EXPORT_TAGS = ( all => \@EXPORT_OK );


=encoding utf8

=head1 NAME

Math::GSL::Errno - Error Handling



    use Math::GSL::Errno qw/:all/;

    print gsl_strerror($GSL_EDOM) . "\n";


=over 4

=item * $GSL_SUCCESS


=item * $GSL_FAILURE

General Failure


Iteration has not converged

=item * $GSL_EDOM

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)

=item * $GSL_ERANGE

Range error; used by mathematical functions when the result value is not representable because of overflow or underflow (like ERANGE in the C library)

=item * $GSL_EFAULT

Invalid Pointer

=item * $GSL_EINVAL

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).

=item * $GSL_EFAILED

Generic Failure

=item * $GSL_EFACTOR

Factorization Failed

=item * $GSL_ESANITY

Sanity Check Failed

=item * $GSL_ENOMEM

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.


Problem with user-supplied function


Iterative process is our of control


Exceeded max number of iterations


Division by zero

=item * $GSL_EBADTOL

Invalid user-specified tolerance

=item * $GSL_ETOL

Failed to reach the specified tolerance



=item * $GSL_EOVRFLW


=item * $GSL_ELOSS

Loss of accuracy

=item * $GSL_EROUND

Failed due to roundoff error

=item * $GSL_EBADLEN

Matrix/vector lengths not compatible

=item * $GSL_ENOTSQR

Not a square matrix

=item * $GSL_ESING

Singularity Detected


Integral/Series is divergent

=item * $GSL_EUNSUP

Not supported by hardware

=item * $GSL_EUNIMPL

Not implemented

=item * $GSL_ECACHE

Cache limit exceeded

=item * $GSL_ETABLE

Table limit exceeded

=item * $GSL_ENOPROG

Iteration not converging


Jacobian not improving solution

=item * $GSL_ETOLF

Cannot reach tolerance in F

=item * $GSL_ETOLX

Cannot reach tolerance in X

=item * $GSL_ETOLG

Cannot reach tolerance in Gradient

=item * $GSL_EOF

End of file




=item * gsl_error

=item * gsl_stream_printf

=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.

=item * gsl_set_error_handler

=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).

=item * gsl_set_stream_handler

=item * gsl_set_stream