Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gen/direct_wrappers/gsl_chebyshev_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ GSL documentation:
> and requires $n$ function evaluations.

"""
function cheb_init(cs, func, a, b)
function cheb_init(cs, func::F, a, b) where F
ccall((:gsl_cheb_init, libgsl), Cint, (Ref{gsl_cheb_series}, Ref{gsl_function}, Cdouble, Cdouble), cs, func, a, b)
end

Expand Down
6 changes: 3 additions & 3 deletions src/gen/direct_wrappers/gsl_deriv_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ GSL documentation:
> actually used.

"""
function deriv_central(f, x, h, result, abserr)
function deriv_central(f::F, x, h, result, abserr) where F
ccall((:gsl_deriv_central, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, h, result, abserr)
end

Expand All @@ -58,7 +58,7 @@ GSL documentation:
> negative step-size.

"""
function deriv_backward(f, x, h, result, abserr)
function deriv_backward(f::F, x, h, result, abserr) where F
ccall((:gsl_deriv_backward, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, h, result, abserr)
end

Expand Down Expand Up @@ -89,7 +89,7 @@ GSL documentation:
> $x+h/2$, $x+h$.

"""
function deriv_forward(f, x, h, result, abserr)
function deriv_forward(f::F, x, h, result, abserr) where F
ccall((:gsl_deriv_forward, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, h, result, abserr)
end

6 changes: 3 additions & 3 deletions src/gen/direct_wrappers/gsl_diff_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
C signature:
`int gsl_diff_central (const gsl_function *f, double x, double *result, double *abserr)`
"""
function diff_central(f, x, result, abserr)
function diff_central(f::F, x, result, abserr) where F
ccall((:gsl_diff_central, libgsl), Cint, (Ref{gsl_function}, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, result, abserr)
end

Expand All @@ -22,7 +22,7 @@ end
C signature:
`int gsl_diff_backward (const gsl_function *f, double x, double *result, double *abserr)`
"""
function diff_backward(f, x, result, abserr)
function diff_backward(f::F, x, result, abserr) where F
ccall((:gsl_diff_backward, libgsl), Cint, (Ref{gsl_function}, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, result, abserr)
end

Expand All @@ -32,7 +32,7 @@ end
C signature:
`int gsl_diff_forward (const gsl_function *f, double x, double *result, double *abserr)`
"""
function diff_forward(f, x, result, abserr)
function diff_forward(f::F, x, result, abserr) where F
ccall((:gsl_diff_forward, libgsl), Cint, (Ref{gsl_function}, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, x, result, abserr)
end

53 changes: 26 additions & 27 deletions src/gen/direct_wrappers/gsl_integration_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ GSL documentation:
>
> texinfo
>
> w(x) = sin(omega x)
> w(x) = sin(omega x)
> w(x) = cos(omega x)
>
> The parameter `L` must be the length of the interval over which the
Expand Down Expand Up @@ -253,7 +253,7 @@ end
C signature:
`void gsl_integration_qk15 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk15(f, a, b, result, abserr, resabs, resasc)
function integration_qk15(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk15, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -263,7 +263,7 @@ end
C signature:
`void gsl_integration_qk21 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk21(f, a, b, result, abserr, resabs, resasc)
function integration_qk21(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk21, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -273,7 +273,7 @@ end
C signature:
`void gsl_integration_qk31 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk31(f, a, b, result, abserr, resabs, resasc)
function integration_qk31(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk31, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -283,7 +283,7 @@ end
C signature:
`void gsl_integration_qk41 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk41(f, a, b, result, abserr, resabs, resasc)
function integration_qk41(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk41, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -293,7 +293,7 @@ end
C signature:
`void gsl_integration_qk51 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk51(f, a, b, result, abserr, resabs, resasc)
function integration_qk51(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk51, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -303,7 +303,7 @@ end
C signature:
`void gsl_integration_qk61 (const gsl_function * f, double a, double b, double *result, double *abserr, double *resabs, double *resasc)`
"""
function integration_qk61(f, a, b, result, abserr, resabs, resasc)
function integration_qk61(f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk61, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -313,7 +313,7 @@ end
C signature:
`void gsl_integration_qcheb (gsl_function * f, double a, double b, double *cheb12, double *cheb24)`
"""
function integration_qcheb(f, a, b, cheb12, cheb24)
function integration_qcheb(f::F, a, b, cheb12, cheb24) where F
ccall((:gsl_integration_qcheb, libgsl), Cvoid, (Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}), f, a, b, cheb12, cheb24)
end

Expand All @@ -323,7 +323,7 @@ end
C signature:
`void gsl_integration_qk (const int n, const double xgk[], const double wg[], const double wgk[], double fv1[], double fv2[], const gsl_function *f, double a, double b, double * result, double * abserr, double * resabs, double * resasc)`
"""
function integration_qk(n, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc)
function integration_qk(n, xgk, wg, wgk, fv1, fv2, f::F, a, b, result, abserr, resabs, resasc) where F
ccall((:gsl_integration_qk, libgsl), Cvoid, (Cint, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{gsl_function}, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}), n, xgk, wg, wgk, fv1, fv2, f, a, b, result, abserr, resabs, resasc)
end

Expand All @@ -348,7 +348,7 @@ GSL documentation:
> of function evaluations.

"""
function integration_qng(f, a, b, epsabs, epsrel, result, abserr, neval)
function integration_qng(f::F, a, b, epsabs, epsrel, result, abserr, neval) where F
ccall((:gsl_integration_qng, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Ref{Cdouble}, Ref{Cdouble}, Ref{Csize_t}), f, a, b, epsabs, epsrel, result, abserr, neval)
end

Expand Down Expand Up @@ -394,7 +394,7 @@ GSL documentation:
> allocated size of the workspace.

"""
function integration_qag(f, a, b, epsabs, epsrel, limit, key, workspace, result, abserr)
function integration_qag(f::F, a, b, epsabs, epsrel, limit, key, workspace, result, abserr) where F
ccall((:gsl_integration_qag, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Csize_t, Cint, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, epsabs, epsrel, limit, key, workspace, result, abserr)
end

Expand All @@ -420,7 +420,7 @@ GSL documentation:
> In this case a lower-order rule is more efficient.

"""
function integration_qagi(f, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qagi(f::F, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qagi, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand All @@ -443,7 +443,7 @@ GSL documentation:
> and then integrated using the QAGS algorithm.

"""
function integration_qagiu(f, a, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qagiu(f::F, a, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qagiu, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, a, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand All @@ -466,7 +466,7 @@ GSL documentation:
> and then integrated using the QAGS algorithm.

"""
function integration_qagil(f, b, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qagil(f::F, b, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qagil, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, b, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand All @@ -493,7 +493,7 @@ GSL documentation:
> which may not exceed the allocated size of the workspace.

"""
function integration_qags(f, a, b, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qags(f::F, a, b, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qags, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand Down Expand Up @@ -527,7 +527,7 @@ GSL documentation:
> region then this routine will be faster than `gsl_integration_qags`.

"""
function integration_qagp(f, pts, npts, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qagp(f::F, pts, npts, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qagp, libgsl), Cint, (Ref{gsl_function}, Ref{Cdouble}, Csize_t, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, pts, npts, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand All @@ -547,7 +547,7 @@ GSL documentation:
> not texinfo
>
> $$I = \int_a^b dx\, {f(x) \over x - c}
> = \lim_{\epsilon \to 0}
> = \lim_{\epsilon \to 0}
> \left\{
> \int_a^{c-\epsilon} dx\, {f(x) \over x - c}
> +
Expand All @@ -566,7 +566,7 @@ GSL documentation:
> ordinary 15-point Gauss-Kronrod integration rule.

"""
function integration_qawc(f, a, b, c, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qawc(f::F, a, b, c, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qawc, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, c, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand Down Expand Up @@ -595,7 +595,7 @@ GSL documentation:
> Gauss-Kronrod integration rule is used.

"""
function integration_qaws(f, a, b, t, epsabs, epsrel, limit, workspace, result, abserr)
function integration_qaws(f::F, a, b, t, epsabs, epsrel, limit, workspace, result, abserr) where F
ccall((:gsl_integration_qaws, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Ref{gsl_integration_qaws_table}, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{Cdouble}, Ref{Cdouble}), f, a, b, t, epsabs, epsrel, limit, workspace, result, abserr)
end

Expand Down Expand Up @@ -627,7 +627,7 @@ GSL documentation:
>
> texinfo
>
> I = int\_a^b dx f(x) sin(omega x)
> I = int\_a^b dx f(x) sin(omega x)
> I = int\_a^b dx f(x) cos(omega x)
>
> The results are extrapolated using the epsilon-algorithm to accelerate
Expand All @@ -645,7 +645,7 @@ GSL documentation:
> integration.

"""
function integration_qawo(f, a, epsabs, epsrel, limit, workspace, wf, result, abserr)
function integration_qawo(f::F, a, epsabs, epsrel, limit, workspace, wf, result, abserr) where F
ccall((:gsl_integration_qawo, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{gsl_integration_qawo_table}, Ref{Cdouble}, Ref{Cdouble}), f, a, epsabs, epsrel, limit, workspace, wf, result, abserr)
end

Expand Down Expand Up @@ -737,7 +737,7 @@ GSL documentation:
> `cycle_workspace` as workspace for the QAWO algorithm.

"""
function integration_qawf(f, a, epsabs, limit, workspace, cycle_workspace, wf, result, abserr)
function integration_qawf(f::F, a, epsabs, limit, workspace, cycle_workspace, wf, result, abserr) where F
ccall((:gsl_integration_qawf, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Csize_t, Ref{gsl_integration_workspace}, Ref{gsl_integration_workspace}, Ref{gsl_integration_qawo_table}, Ref{Cdouble}, Ref{Cdouble}), f, a, epsabs, limit, workspace, cycle_workspace, wf, result, abserr)
end

Expand Down Expand Up @@ -793,7 +793,7 @@ GSL documentation:
> table `t` and returns the result.

"""
function integration_glfixed(f, a, b, t)
function integration_glfixed(f::F, a, b, t) where F
ccall((:gsl_integration_glfixed, libgsl), Cdouble, (Ref{gsl_function}, Cdouble, Cdouble, Ref{gsl_integration_glfixed_table}), f, a, b, t)
end

Expand Down Expand Up @@ -890,7 +890,7 @@ GSL documentation:
> set to `NULL`.

"""
function integration_cquad(f, a, b, epsabs, epsrel, ws, result, abserr, nevals)
function integration_cquad(f::F, a, b, epsabs, epsrel, ws, result, abserr, nevals) where F
ccall((:gsl_integration_cquad, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Ref{gsl_integration_cquad_workspace}, Ref{Cdouble}, Ref{Cdouble}, Ref{Csize_t}), f, a, b, epsabs, epsrel, ws, result, abserr, nevals)
end

Expand Down Expand Up @@ -957,7 +957,7 @@ GSL documentation:
> `neval`.

"""
function integration_romberg(f, a, b, epsabs, epsrel, result, neval, w)
function integration_romberg(f::F, a, b, epsabs, epsrel, result, neval, w) where F
ccall((:gsl_integration_romberg, libgsl), Cint, (Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Ref{Cdouble}, Ref{Csize_t}, Ref{gsl_integration_romberg_workspace}), f, a, b, epsabs, epsrel, result, neval, w)
end

Expand Down Expand Up @@ -1116,7 +1116,6 @@ GSL documentation:
> approximated as

"""
function integration_fixed(func, result, w)
function integration_fixed(func::F, result, w) where F
ccall((:gsl_integration_fixed, libgsl), Cint, (Ref{gsl_function}, Ref{Cdouble}, Ref{gsl_integration_fixed_workspace}), func, result, w)
end

6 changes: 3 additions & 3 deletions src/gen/direct_wrappers/gsl_min_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ GSL documentation:
> returns an error code of `GSL_EINVAL`.

"""
function min_fminimizer_set(s, f, x_minimum, x_lower, x_upper)
function min_fminimizer_set(s, f::F, x_minimum, x_lower, x_upper) where F
ccall((:gsl_min_fminimizer_set, libgsl), Cint, (Ref{gsl_min_fminimizer}, Ref{gsl_function}, Cdouble, Cdouble, Cdouble), s, f, x_minimum, x_lower, x_upper)
end

Expand All @@ -86,7 +86,7 @@ GSL documentation:
> `f(x_minimum)`, `f(x_lower)` and `f(x_upper)`.

"""
function min_fminimizer_set_with_values(s, f, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper)
function min_fminimizer_set_with_values(s, f::F, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper) where F
ccall((:gsl_min_fminimizer_set_with_values, libgsl), Cint, (Ref{gsl_min_fminimizer}, Ref{gsl_function}, Cdouble, Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), s, f, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper)
end

Expand Down Expand Up @@ -301,7 +301,7 @@ end
C signature:
`int gsl_min_find_bracket(gsl_function *f,double *x_minimum,double * f_minimum, double *x_lower, double * f_lower, double *x_upper, double * f_upper, size_t eval_max)`
"""
function min_find_bracket(f, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper, eval_max)
function min_find_bracket(f::F, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper, eval_max) where F
ccall((:gsl_min_find_bracket, libgsl), Cint, (Ref{gsl_function}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Ref{Cdouble}, Csize_t), f, x_minimum, f_minimum, x_lower, f_lower, x_upper, f_upper, eval_max)
end

2 changes: 1 addition & 1 deletion src/gen/direct_wrappers/gsl_roots_h.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GSL documentation:
> `x_upper`\].

"""
function root_fsolver_set(s, f, x_lower, x_upper)
function root_fsolver_set(s, f::F, x_lower, x_upper) where F
ccall((:gsl_root_fsolver_set, libgsl), Cint, (Ref{gsl_root_fsolver}, Ref{gsl_function}, Cdouble, Cdouble), s, f, x_lower, x_upper)
end

Expand Down
Loading