File: Min.i

package info (click to toggle)
libmath-gsl-perl 0.45-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192,156 kB
  • sloc: ansic: 895,524; perl: 24,682; makefile: 12
file content (28 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
%module "Math::GSL::Min"
%include "typemaps.i"
%include "gsl_typemaps.i"
%include "renames.i"

%typemap(freearg) gsl_function *;
%newobject gsl_min_fminimizer_alloc;
%extend gsl_min_fminimizer {
    ~gsl_min_fminimizer() {
        struct gsl_function *gsl_f = (struct gsl_function *) $self->function;
        if (gsl_f != NULL) {
            struct gsl_function_perl *perl_f = (struct gsl_function_perl *) $self->function->params;
            gsl_function_perl_free(perl_f);
        }
        gsl_min_fminimizer_free($self);
    }
}


%{
    #include "gsl/gsl_types.h"
    #include "gsl/gsl_min.h"
    #include "gsl/gsl_math.h"
%}
%include "gsl/gsl_types.h"
%include "gsl/gsl_min.h"
%include "gsl/gsl_math.h"
%include "../pod/Min.pod"