;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "gsl/gsl-config")



#? *** aux_globalvar

;; dummy function that adds GSL C header files in C file
(eval `(de dummy_aux_globalvar () ,gsl-cpheader-cmd ()))

#? * (dummy_aux_globalvar)
#? * (var_gsl_interp_linear)
#? * (var_gsl_interp_polynomial)
#? * (var_gsl_interp_cspline)
#? * (var_gsl_interp_cspline_periodic)
#? * (var_gsl_interp_akima)
#? * (var_gsl_interp_akima_periodic)
#? * (var_gsl_multifit_fdfsolver_lmder)
#? * (var_gsl_multifit_fdfsolver_lmsder)
#? * (var_gsl_root_fsolver_bisection)
#? * (var_gsl_root_fsolver_brent)
#? * (var_gsl_root_fsolver_falsepos)
#? * (var_gsl_root_fdfsolver_newton)
#? * (var_gsl_root_fdfsolver_secant)
#? * (var_gsl_root_fdfsolver_steffenson)
#? * (var_gsl_min_fminimizer_goldensection)
#? * (var_gsl_min_fminimizer_brent)
#? * (var_gsl_multimin_fdfminimizer_steepest_descent)
#? * (var_gsl_multimin_fdfminimizer_conjugate_pr)
#? * (var_gsl_multimin_fdfminimizer_conjugate_fr)
#? * (var_gsl_multimin_fdfminimizer_vector_bfgs)
#? * (var_gsl_multiroot_fsolver_dnewton)
#? * (var_gsl_multiroot_fsolver_broyden)
#? * (var_gsl_multiroot_fsolver_hybrid)
#? * (var_gsl_multiroot_fsolver_hybrids)
#? * (var_gsl_multiroot_fdfsolver_newton)
#? * (var_gsl_multiroot_fdfsolver_gnewton)
#? * (var_gsl_multiroot_fdfsolver_hybridj)
#? * (var_gsl_multiroot_fdfsolver_hybridsj)
#? * (var_gsl_odeiv_step_rk2)
#? * (var_gsl_odeiv_step_rk4)
#? * (var_gsl_odeiv_step_rkf45)
#? * (var_gsl_odeiv_step_rkck)
#? * (var_gsl_odeiv_step_rk8pd)
#? * (var_gsl_odeiv_step_rk2imp)
#? * (var_gsl_odeiv_step_rk4imp)
#? * (var_gsl_odeiv_step_bsimp)
#? * (var_gsl_odeiv_step_gear1)
#? * (var_gsl_odeiv_step_gear2)
#? * (var_gsl_prec_eps)
#? * (var_gsl_prec_sqrt_eps)
#? * (var_gsl_prec_root3_eps)
#? * (var_gsl_prec_root4_eps)
#? * (var_gsl_prec_root5_eps)
#? * (var_gsl_prec_root6_eps)
#? * (var_gsl_version)
#? * (var_gsl_rng_default)
#? * (var_gsl_check_range)
#? * (var_gsl_warnings_off)
#? * (var_gsl_message_mask)
#? * (var_gsl_rng_default_seed)

;; ********************************************************

;; functions to retrieve global variables

(de var_gsl_interp_linear ()
    (gptr #{ gsl_interp_linear #} ))

(if (> gsl-libversion 1.0)
    (de var_gsl_interp_polynomial ()
      (gptr #{ gsl_interp_polynomial #} ))
  (de var_gsl_interp_polynomial ()
    (error "not available in this version of GSL") ()))

(de var_gsl_interp_cspline ()
    (gptr #{ gsl_interp_cspline #} ))

(de var_gsl_interp_cspline_periodic ()
    (gptr #{ gsl_interp_cspline_periodic #} ))

(de var_gsl_interp_akima ()
    (gptr #{ gsl_interp_akima  #} ))

(de var_gsl_interp_akima_periodic ()
    (gptr #{ gsl_interp_akima_periodic #} ))



(de var_gsl_multifit_fdfsolver_lmder ()
    (gptr #{ gsl_multifit_fdfsolver_lmder #} ))

(de var_gsl_multifit_fdfsolver_lmsder ()
    (gptr #{ gsl_multifit_fdfsolver_lmsder #} ))



(de var_gsl_root_fsolver_bisection ()
    (gptr #{ gsl_root_fsolver_bisection #} ))

(de var_gsl_root_fsolver_brent ()
    (gptr #{ gsl_root_fsolver_brent #} ))

(de var_gsl_root_fsolver_falsepos ()
    (gptr #{ gsl_root_fsolver_falsepos #} ))

(de var_gsl_root_fdfsolver_newton ()
    (gptr #{ gsl_root_fdfsolver_newton #} ))

(de var_gsl_root_fdfsolver_secant ()
    (gptr #{ gsl_root_fdfsolver_secant #} ))

(de var_gsl_root_fdfsolver_steffenson ()
    (gptr #{ gsl_root_fdfsolver_steffenson #} ))



(de var_gsl_min_fminimizer_goldensection ()
    (gptr #{ gsl_min_fminimizer_goldensection #} ))

(de var_gsl_min_fminimizer_brent ()
    (gptr #{ gsl_min_fminimizer_brent #} ))



(de var_gsl_multimin_fdfminimizer_steepest_descent ()
    (gptr #{ gsl_multimin_fdfminimizer_steepest_descent #} ))

(de var_gsl_multimin_fdfminimizer_conjugate_pr ()
    (gptr #{ gsl_multimin_fdfminimizer_conjugate_pr #} ))

(de var_gsl_multimin_fdfminimizer_conjugate_fr ()
    (gptr #{ gsl_multimin_fdfminimizer_conjugate_fr #} ))

(de var_gsl_multimin_fdfminimizer_vector_bfgs ()
    (gptr #{ gsl_multimin_fdfminimizer_vector_bfgs #} ))




(de var_gsl_multiroot_fsolver_dnewton ()
    (gptr #{ gsl_multiroot_fsolver_dnewton #} ))

(de var_gsl_multiroot_fsolver_broyden ()
    (gptr #{ gsl_multiroot_fsolver_broyden #} ))

(de var_gsl_multiroot_fsolver_hybrid ()
    (gptr #{ gsl_multiroot_fsolver_hybrid #} ))

(de var_gsl_multiroot_fsolver_hybrids ()
    (gptr #{ gsl_multiroot_fsolver_hybrids #} ))

(de var_gsl_multiroot_fdfsolver_newton ()
    (gptr #{ gsl_multiroot_fdfsolver_newton #} ))

(de var_gsl_multiroot_fdfsolver_gnewton ()
    (gptr #{ gsl_multiroot_fdfsolver_gnewton #} ))

(de var_gsl_multiroot_fdfsolver_hybridj ()
    (gptr #{ gsl_multiroot_fdfsolver_hybridj #} ))

(de var_gsl_multiroot_fdfsolver_hybridsj ()
    (gptr #{ gsl_multiroot_fdfsolver_hybridsj #} ))



(de var_gsl_odeiv_step_rk2 ()
    (gptr #{ gsl_odeiv_step_rk2 #} ))

(de var_gsl_odeiv_step_rk4 ()
    (gptr #{ gsl_odeiv_step_rk4 #} ))

(de var_gsl_odeiv_step_rkf45 ()
    (gptr #{ gsl_odeiv_step_rkf45 #} ))

(de var_gsl_odeiv_step_rkck ()
    (gptr #{ gsl_odeiv_step_rkck #} ))

(de var_gsl_odeiv_step_rk8pd ()
    (gptr #{ gsl_odeiv_step_rk8pd #} ))

(de var_gsl_odeiv_step_rk2imp ()
    (gptr #{ gsl_odeiv_step_rk2imp #} ))

(de var_gsl_odeiv_step_rk4imp ()
    (gptr #{ gsl_odeiv_step_rk4imp #} ))

(de var_gsl_odeiv_step_bsimp ()
    (gptr #{ gsl_odeiv_step_bsimp #} ))

(de var_gsl_odeiv_step_gear1 ()
    (gptr #{ gsl_odeiv_step_gear1 #} ))

(de var_gsl_odeiv_step_gear2 ()
    (gptr #{ gsl_odeiv_step_gear2 #} ))



(de var_gsl_prec_eps ()
    (gptr #{ gsl_prec_eps  #} ))

(de var_gsl_prec_sqrt_eps ()
    (gptr #{ gsl_prec_sqrt_eps  #} ))

(de var_gsl_prec_root3_eps ()
    (gptr #{ gsl_prec_root3_eps  #} ))

(de var_gsl_prec_root4_eps ()
    (gptr #{ gsl_prec_root4_eps  #} ))

(de var_gsl_prec_root5_eps ()
    (gptr #{ gsl_prec_root5_eps  #} ))

(de var_gsl_prec_root6_eps ()
    (gptr #{ gsl_prec_root6_eps  #} ))

(de var_gsl_version ()
    (gptr #{ gsl_version  #} ))

(de var_gsl_rng_default ()
    (gptr #{ gsl_rng_default  #} ))



(de var_gsl_check_range ()
    (int #{ gsl_check_range #} ))

;; apparently, this isn't there anymore
;; (de var_gsl_warnings_off ()
;;     (int #{ gsl_warnings_off #} ))

(de var_gsl_message_mask ()
    (int #{ gsl_message_mask #} )) ;; unsigned int -> int

(de var_gsl_rng_default_seed ()
    (int #{ gsl_rng_default_seed #} ))  ;; unsigned long int -> int

()



;; ********************************************************

(dhc-make ()
  dummy_aux_globalvar
  var_gsl_interp_linear
  var_gsl_interp_polynomial
  var_gsl_interp_cspline
  var_gsl_interp_cspline_periodic
  var_gsl_interp_akima
  var_gsl_interp_akima_periodic
  var_gsl_multifit_fdfsolver_lmder
  var_gsl_multifit_fdfsolver_lmsder
  var_gsl_root_fsolver_bisection
  var_gsl_root_fsolver_brent
  var_gsl_root_fsolver_falsepos
  var_gsl_root_fdfsolver_newton
  var_gsl_root_fdfsolver_secant
  var_gsl_root_fdfsolver_steffenson
  var_gsl_min_fminimizer_goldensection
  var_gsl_min_fminimizer_brent
  var_gsl_multimin_fdfminimizer_steepest_descent
  var_gsl_multimin_fdfminimizer_conjugate_pr
  var_gsl_multimin_fdfminimizer_conjugate_fr
  var_gsl_multimin_fdfminimizer_vector_bfgs
  var_gsl_multiroot_fsolver_dnewton
  var_gsl_multiroot_fsolver_broyden
  var_gsl_multiroot_fsolver_hybrid
  var_gsl_multiroot_fsolver_hybrids
  var_gsl_multiroot_fdfsolver_newton
  var_gsl_multiroot_fdfsolver_gnewton
  var_gsl_multiroot_fdfsolver_hybridj
  var_gsl_multiroot_fdfsolver_hybridsj
  var_gsl_odeiv_step_rk2
  var_gsl_odeiv_step_rk4
  var_gsl_odeiv_step_rkf45
  var_gsl_odeiv_step_rkck
  var_gsl_odeiv_step_rk8pd
  var_gsl_odeiv_step_rk2imp
  var_gsl_odeiv_step_rk4imp
  var_gsl_odeiv_step_bsimp
  var_gsl_odeiv_step_gear1
  var_gsl_odeiv_step_gear2
  var_gsl_prec_eps
  var_gsl_prec_sqrt_eps
  var_gsl_prec_root3_eps
  var_gsl_prec_root4_eps
  var_gsl_prec_root5_eps
  var_gsl_prec_root6_eps
  var_gsl_version
  var_gsl_rng_default
  var_gsl_check_range
  ;; var_gsl_warnings_off
  var_gsl_message_mask
  var_gsl_rng_default_seed
)
