;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; 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")



#? *** randist

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

#? * (dummy_randist)
#? * (gsl_ran_bernoulli <r> <p>)
#? * (gsl_ran_bernoulli_pdf <k> <p>)
#? * (gsl_ran_beta <r> <a> <b>)
#? * (gsl_ran_beta_pdf <x> <a> <b>)
#? * (gsl_ran_binomial <r> <p> <n>)
#? * (gsl_ran_binomial_pdf <k> <p> <n>)
#? * (gsl_ran_exponential <r> <mu>)
#? * (gsl_ran_exponential_pdf <x> <mu>)
#? * (gsl_ran_exppow <r> <a> <b>)
#? * (gsl_ran_exppow_pdf <x> <a> <b>)
#? * (gsl_ran_cauchy <r> <a>)
#? * (gsl_ran_cauchy_pdf <x> <a>)
#? * (gsl_ran_chisq <r> <nu>)
#? * (gsl_ran_chisq_pdf <x> <nu>)
#? * (gsl_ran_erlang <r> <a> <n>)
#? * (gsl_ran_erlang_pdf <x> <a> <n>)
#? * (gsl_ran_fdist <r> <nu1> <nu2>)
#? * (gsl_ran_fdist_pdf <x> <nu1> <nu2>)
#? * (gsl_ran_flat <r> <a> <b>)
#? * (gsl_ran_flat_pdf <x> <a> <b>)
#? * (gsl_ran_gamma <r> <a> <b>)
#? * (gsl_ran_gamma_int <r> <a>)
#? * (gsl_ran_gamma_pdf <x> <a> <b>)
#? * (gsl_ran_gaussian <r> <sigma>)
#? * (gsl_ran_gaussian_ratio_method <r> <sigma>)
#? * (gsl_ran_gaussian_pdf <x> <sigma>)
#? * (gsl_ran_ugaussian <r>)
#? * (gsl_ran_ugaussian_ratio_method <r>)
#? * (gsl_ran_ugaussian_pdf <x>)
#? * (gsl_ran_gaussian_tail <r> <a> <sigma>)
#? * (gsl_ran_gaussian_tail_pdf <x> <a> <sigma>)
#? * (gsl_ran_ugaussian_tail <r> <a>)
#? * (gsl_ran_ugaussian_tail_pdf <x> <a>)
#? * (gsl_ran_bivariate_gaussian <r> <sigma_x> <sigma_y> <rho> <x> <y>)
#? * (gsl_ran_bivariate_gaussian_pdf <x> <y> <sigma_x> <sigma_y> <rho>)
#? * (gsl_ran_landau <r>)
#? * (gsl_ran_landau_pdf <x>)
#? * (gsl_ran_geometric <r> <p>)
#? * (gsl_ran_geometric_pdf <k> <p>)
#? * (gsl_ran_hypergeometric <r> <n1> <n2> <t>)
#? * (gsl_ran_hypergeometric_pdf <k> <n1> <n2> <t>)
#? * (gsl_ran_gumbel1 <r> <a> <b>)
#? * (gsl_ran_gumbel1_pdf <x> <a> <b>)
#? * (gsl_ran_gumbel2 <r> <a> <b>)
#? * (gsl_ran_gumbel2_pdf <x> <a> <b>)
#? * (gsl_ran_logistic <r> <a>)
#? * (gsl_ran_logistic_pdf <x> <a>)
#? * (gsl_ran_lognormal <r> <zeta> <sigma>)
#? * (gsl_ran_lognormal_pdf <x> <zeta> <sigma>)
#? * (gsl_ran_logarithmic <r> <p>)
#? * (gsl_ran_logarithmic_pdf <k> <p>)
#? * (gsl_ran_negative_binomial <r> <p> <n>)
#? * (gsl_ran_negative_binomial_pdf <k> <p> <n>)
#? * (gsl_ran_pascal <r> <p> <n>)
#? * (gsl_ran_pascal_pdf <k> <p> <n>)
#? * (gsl_ran_pareto <r> <a> <b>)
#? * (gsl_ran_pareto_pdf <x> <a> <b>)
#? * (gsl_ran_poisson <r> <mu>)
#? * (gsl_ran_poisson_array <r> <n> <array> <mu>)
#? * (gsl_ran_poisson_pdf <k> <mu>)
#? * (gsl_ran_rayleigh <r> <sigma>)
#? * (gsl_ran_rayleigh_pdf <x> <sigma>)
#? * (gsl_ran_rayleigh_tail <r> <a> <sigma>)
#? * (gsl_ran_rayleigh_tail_pdf <x> <a> <sigma>)
#? * (gsl_ran_tdist <r> <nu>)
#? * (gsl_ran_tdist_pdf <x> <nu>)
#? * (gsl_ran_laplace <r> <a>)
#? * (gsl_ran_laplace_pdf <x> <a>)
#? * (gsl_ran_levy <r> <c> <alpha>)
#? * (gsl_ran_levy_skew <r> <c> <alpha> <beta>)
#? * (gsl_ran_weibull <r> <a> <b>)
#? * (gsl_ran_weibull_pdf <x> <a> <b>)
#? * (gsl_ran_dir_2d <r> <x> <y>)
#? * (gsl_ran_dir_2d_trig_method <r> <x> <y>)
#? * (gsl_ran_dir_3d <r> <x> <y> <z>)
#? * (gsl_ran_dir_nd <r> <n> <x>)
#? * (gsl_ran_shuffle <r> <base> <nmembm> <size>)
#? * (gsl_ran_choose <r> <dest> <k> <src> <n> <size>)
#? * (gsl_ran_sample <r> <dest> <k> <src> <n> <size>)
#? * (gsl_ran_discrete_preproc <k> <p>)
#? * (gsl_ran_discrete_free <g>)
#? * (gsl_ran_discrete <r> <g>)
#? * (gsl_ran_discrete_pdf <k> <g>)

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


(de gsl_ran_bernoulli (    r  p )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    (int #{ gsl_ran_bernoulli (  $r ,$p) #} )          ;; unsigned  -> signed
)

(de gsl_ran_bernoulli_pdf (    k  p )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    (double #{ gsl_ran_bernoulli_pdf (  $k ,$p) #} )
)


(de gsl_ran_beta (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_beta (  $r ,$a ,$b) #} )
)

(de gsl_ran_beta_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_beta_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_binomial (    r  p  n )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    ((-int-) n)                                  ;; unsigned -> signed
    (int #{ gsl_ran_binomial (  $r ,$p ,$n) #} )          ;; unsigned  -> signed
)

(de gsl_ran_binomial_pdf (    k  p  n )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    ((-int-) n)                                  ;; unsigned -> signed
    (double #{ gsl_ran_binomial_pdf (  $k ,$p ,$n) #} )
)


(de gsl_ran_exponential (    r  mu )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) mu) 
    (double #{ gsl_ran_exponential (  $r ,$mu) #} )
)

(de gsl_ran_exponential_pdf (    x  mu )
    ((-double-) x) 
    ((-double-) mu) 
    (double #{ gsl_ran_exponential_pdf (  $x ,$mu) #} )
)


(de gsl_ran_exppow (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_exppow (  $r ,$a ,$b) #} )
)

(de gsl_ran_exppow_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_exppow_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_cauchy (    r  a )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    (double #{ gsl_ran_cauchy (  $r ,$a) #} )
)

(de gsl_ran_cauchy_pdf (    x  a )
    ((-double-) x) 
    ((-double-) a) 
    (double #{ gsl_ran_cauchy_pdf (  $x ,$a) #} )
)


(de gsl_ran_chisq (    r  nu )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) nu) 
    (double #{ gsl_ran_chisq (  $r ,$nu) #} )
)

(de gsl_ran_chisq_pdf (    x  nu )
    ((-double-) x) 
    ((-double-) nu) 
    (double #{ gsl_ran_chisq_pdf (  $x ,$nu) #} )
)


(de gsl_ran_erlang (    r  a  n )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) n) 
    (double #{ gsl_ran_erlang (  $r ,$a ,$n) #} )
)

(de gsl_ran_erlang_pdf (    x  a  n )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) n) 
    (double #{ gsl_ran_erlang_pdf (  $x ,$a ,$n) #} )
)


(de gsl_ran_fdist (    r  nu1  nu2 )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) nu1) 
    ((-double-) nu2) 
    (double #{ gsl_ran_fdist (  $r ,$nu1 ,$nu2) #} )
)

(de gsl_ran_fdist_pdf (    x  nu1  nu2 )
    ((-double-) x) 
    ((-double-) nu1) 
    ((-double-) nu2) 
    (double #{ gsl_ran_fdist_pdf (  $x ,$nu1 ,$nu2) #} )
)


(de gsl_ran_flat (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_flat (  $r ,$a ,$b) #} )
)

(de gsl_ran_flat_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_flat_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_gamma (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gamma (  $r ,$a ,$b) #} )
)

(de gsl_ran_gamma_int (    r  a )
    ((-gptr- "const gsl_rng *") r) 
    ((-int-) a)                                  ;; unsigned -> signed
    (double #{ gsl_ran_gamma_int (  $r ,$a) #} )
)

(de gsl_ran_gamma_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gamma_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_gaussian (    r  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) sigma) 
    (double #{ gsl_ran_gaussian (  $r ,$sigma) #} )
)

(de gsl_ran_gaussian_ratio_method (    r  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) sigma) 
    (double #{ gsl_ran_gaussian_ratio_method (  $r ,$sigma) #} )
)

(de gsl_ran_gaussian_pdf (    x  sigma )
    ((-double-) x) 
    ((-double-) sigma) 
    (double #{ gsl_ran_gaussian_pdf (  $x ,$sigma) #} )
)


(de gsl_ran_ugaussian (    r )
    ((-gptr- "const gsl_rng *") r) 
    (double #{ gsl_ran_ugaussian (  $r) #} )
)

(de gsl_ran_ugaussian_ratio_method (    r )
    ((-gptr- "const gsl_rng *") r) 
    (double #{ gsl_ran_ugaussian_ratio_method (  $r) #} )
)

(de gsl_ran_ugaussian_pdf (    x )
    ((-double-) x) 
    (double #{ gsl_ran_ugaussian_pdf (  $x) #} )
)


(de gsl_ran_gaussian_tail (    r  a  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) sigma) 
    (double #{ gsl_ran_gaussian_tail (  $r ,$a ,$sigma) #} )
)

(de gsl_ran_gaussian_tail_pdf (    x  a  sigma )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) sigma) 
    (double #{ gsl_ran_gaussian_tail_pdf (  $x ,$a ,$sigma) #} )
)


(de gsl_ran_ugaussian_tail (    r  a )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    (double #{ gsl_ran_ugaussian_tail (  $r ,$a) #} )
)

(de gsl_ran_ugaussian_tail_pdf (    x  a )
    ((-double-) x) 
    ((-double-) a) 
    (double #{ gsl_ran_ugaussian_tail_pdf (  $x ,$a) #} )
)


(de gsl_ran_bivariate_gaussian (    r  sigma_x  sigma_y  rho   x   y )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) sigma_x) 
    ((-double-) sigma_y) 
    ((-double-) rho) 
    ((-gptr- "double *") x) 
    ((-gptr- "double *") y) 
    #{ gsl_ran_bivariate_gaussian (  $r ,$sigma_x ,$sigma_y ,$rho ,$x ,$y) #} 
    ()
)

(de gsl_ran_bivariate_gaussian_pdf (    x  y  sigma_x  sigma_y  rho )
    ((-double-) x) 
    ((-double-) y) 
    ((-double-) sigma_x) 
    ((-double-) sigma_y) 
    ((-double-) rho) 
    (double #{ gsl_ran_bivariate_gaussian_pdf (  $x ,$y ,$sigma_x ,$sigma_y ,$rho) #} )
)


(de gsl_ran_landau (    r )
    ((-gptr- "const gsl_rng *") r) 
    (double #{ gsl_ran_landau (  $r) #} )
)

(de gsl_ran_landau_pdf (    x )
    ((-double-) x) 
    (double #{ gsl_ran_landau_pdf (  $x) #} )
)


(de gsl_ran_geometric (    r  p )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    (int #{ gsl_ran_geometric (  $r ,$p) #} )          ;; unsigned  -> signed
)

(de gsl_ran_geometric_pdf (    k  p )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    (double #{ gsl_ran_geometric_pdf (  $k ,$p) #} )
)


(de gsl_ran_hypergeometric (    r  n1  n2  t )
    ((-gptr- "const gsl_rng *") r) 
    ((-int-) n1)                                  ;; unsigned -> signed
    ((-int-) n2)                                  ;; unsigned -> signed
    ((-int-) t)                                  ;; unsigned -> signed
    (int #{ gsl_ran_hypergeometric (  $r ,$n1 ,$n2 ,$t) #} )          ;; unsigned  -> signed
)

(de gsl_ran_hypergeometric_pdf (    k  n1  n2  t )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-int-) n1)                                  ;; unsigned -> signed
    ((-int-) n2)                                  ;; unsigned -> signed
    ((-int-) t)                                  ;; unsigned -> signed
    (double #{ gsl_ran_hypergeometric_pdf (  $k ,$n1 ,$n2 ,$t) #} )
)


(de gsl_ran_gumbel1 (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gumbel1 (  $r ,$a ,$b) #} )
)

(de gsl_ran_gumbel1_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gumbel1_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_gumbel2 (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gumbel2 (  $r ,$a ,$b) #} )
)

(de gsl_ran_gumbel2_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_gumbel2_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_logistic (    r  a )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    (double #{ gsl_ran_logistic (  $r ,$a) #} )
)

(de gsl_ran_logistic_pdf (    x  a )
    ((-double-) x) 
    ((-double-) a) 
    (double #{ gsl_ran_logistic_pdf (  $x ,$a) #} )
)


(de gsl_ran_lognormal (    r  zeta  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) zeta) 
    ((-double-) sigma) 
    (double #{ gsl_ran_lognormal (  $r ,$zeta ,$sigma) #} )
)

(de gsl_ran_lognormal_pdf (    x  zeta  sigma )
    ((-double-) x) 
    ((-double-) zeta) 
    ((-double-) sigma) 
    (double #{ gsl_ran_lognormal_pdf (  $x ,$zeta ,$sigma) #} )
)


(de gsl_ran_logarithmic (    r  p )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    (int #{ gsl_ran_logarithmic (  $r ,$p) #} )          ;; unsigned  -> signed
)

(de gsl_ran_logarithmic_pdf (    k  p )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    (double #{ gsl_ran_logarithmic_pdf (  $k ,$p) #} )
)


(de gsl_ran_negative_binomial (    r  p  n )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    ((-double-) n) 
    (int #{ gsl_ran_negative_binomial (  $r ,$p ,$n) #} )          ;; unsigned  -> signed
)

(de gsl_ran_negative_binomial_pdf (    k  p  n )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    ((-double-) n) 
    (double #{ gsl_ran_negative_binomial_pdf (  $k ,$p ,$n) #} )
)


(de gsl_ran_pascal (    r  p  n )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) p) 
    ((-int-) n)                                  ;; unsigned -> signed
    (int #{ gsl_ran_pascal (  $r ,$p ,$n) #} )          ;; unsigned  -> signed
)

(de gsl_ran_pascal_pdf (    k  p  n )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) p) 
    ((-int-) n)                                  ;; unsigned -> signed
    (double #{ gsl_ran_pascal_pdf (  $k ,$p ,$n) #} )
)


(de gsl_ran_pareto (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_pareto (  $r ,$a ,$b) #} )
)

(de gsl_ran_pareto_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_pareto_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_poisson (    r  mu )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) mu) 
    (int #{ gsl_ran_poisson (  $r ,$mu) #} )          ;; unsigned  -> signed
)

(de gsl_ran_poisson_array (    r  n  array  mu )
    ((-gptr- "const gsl_rng *") r) 
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "unsigned int *") array) 
    ((-double-) mu) 
    #{ gsl_ran_poisson_array (  $r ,$n ,$array ,$mu) #} 
    ()
)

(de gsl_ran_poisson_pdf (    k  mu )
    ((-int-) k)                                  ;; unsigned -> signed
    ((-double-) mu) 
    (double #{ gsl_ran_poisson_pdf (  $k ,$mu) #} )
)


(de gsl_ran_rayleigh (    r  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) sigma) 
    (double #{ gsl_ran_rayleigh (  $r ,$sigma) #} )
)

(de gsl_ran_rayleigh_pdf (    x  sigma )
    ((-double-) x) 
    ((-double-) sigma) 
    (double #{ gsl_ran_rayleigh_pdf (  $x ,$sigma) #} )
)


(de gsl_ran_rayleigh_tail (    r  a  sigma )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) sigma) 
    (double #{ gsl_ran_rayleigh_tail (  $r ,$a ,$sigma) #} )
)

(de gsl_ran_rayleigh_tail_pdf (    x  a  sigma )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) sigma) 
    (double #{ gsl_ran_rayleigh_tail_pdf (  $x ,$a ,$sigma) #} )
)


(de gsl_ran_tdist (    r  nu )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) nu) 
    (double #{ gsl_ran_tdist (  $r ,$nu) #} )
)

(de gsl_ran_tdist_pdf (    x  nu )
    ((-double-) x) 
    ((-double-) nu) 
    (double #{ gsl_ran_tdist_pdf (  $x ,$nu) #} )
)


(de gsl_ran_laplace (    r  a )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    (double #{ gsl_ran_laplace (  $r ,$a) #} )
)

(de gsl_ran_laplace_pdf (    x  a )
    ((-double-) x) 
    ((-double-) a) 
    (double #{ gsl_ran_laplace_pdf (  $x ,$a) #} )
)


(de gsl_ran_levy (    r  c  alpha )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) c) 
    ((-double-) alpha) 
    (double #{ gsl_ran_levy (  $r ,$c ,$alpha) #} )
)

(de gsl_ran_levy_skew (    r  c  alpha  beta )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) c) 
    ((-double-) alpha) 
    ((-double-) beta) 
    (double #{ gsl_ran_levy_skew (  $r ,$c ,$alpha ,$beta) #} )
)


(de gsl_ran_weibull (    r  a  b )
    ((-gptr- "const gsl_rng *") r) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_weibull (  $r ,$a ,$b) #} )
)

(de gsl_ran_weibull_pdf (    x  a  b )
    ((-double-) x) 
    ((-double-) a) 
    ((-double-) b) 
    (double #{ gsl_ran_weibull_pdf (  $x ,$a ,$b) #} )
)


(de gsl_ran_dir_2d (    r  x  y )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "double *") x) 
    ((-gptr- "double *") y) 
    #{ gsl_ran_dir_2d (  $r ,$x ,$y) #} 
    ()
)

(de gsl_ran_dir_2d_trig_method (    r  x  y )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "double *") x) 
    ((-gptr- "double *") y) 
    #{ gsl_ran_dir_2d_trig_method (  $r ,$x ,$y) #} 
    ()
)

(de gsl_ran_dir_3d (    r  x  y  z )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "double *") x) 
    ((-gptr- "double *") y) 
    ((-gptr- "double *") z) 
    #{ gsl_ran_dir_3d (  $r ,$x ,$y ,$z) #} 
    ()
)

(de gsl_ran_dir_nd (    r  n  x )
    ((-gptr- "const gsl_rng *") r) 
    ((-int-) n)                     ;; size_t -> int
    ((-gptr- "double *") x) 
    #{ gsl_ran_dir_nd (  $r ,$n ,$x) #} 
    ()
)


(de gsl_ran_shuffle (    r  base  nmembm  size )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "void *") base) 
    ((-int-) nmembm)                     ;; size_t -> int
    ((-int-) size)                     ;; size_t -> int
    #{ gsl_ran_shuffle (  $r ,$base ,$nmembm ,$size) #} 
    ()
)

(de gsl_ran_choose (    r  dest  k  src  n  size )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "void *") dest) 
    ((-int-) k)                     ;; size_t -> int
    ((-gptr- "void *") src) 
    ((-int-) n)                     ;; size_t -> int
    ((-int-) size)                     ;; size_t -> int
    (int #{ gsl_ran_choose (  $r ,$dest ,$k ,$src ,$n ,$size)  #} )
)

(de gsl_ran_sample (    r  dest  k  src  n  size )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "void *") dest) 
    ((-int-) k)                     ;; size_t -> int
    ((-gptr- "void *") src) 
    ((-int-) n)                     ;; size_t -> int
    ((-int-) size)                     ;; size_t -> int
    #{ gsl_ran_sample (  $r ,$dest ,$k ,$src ,$n ,$size)  #} 
    ()
)



(de gsl_ran_discrete_preproc (    k   p )
    ((-int-) k)                     ;; size_t -> int
    ((-gptr- "const double *") p) 
    (gptr #{ gsl_ran_discrete_preproc (  $k ,$p) #} )          ;; gsl_ran_discrete_t * -> gptr
)

(de gsl_ran_discrete_free (     g )
    ((-gptr- "gsl_ran_discrete_t *") g) 
    #{ gsl_ran_discrete_free(  $g) #} 
    ()
)

(de gsl_ran_discrete (     r   g )
    ((-gptr- "const gsl_rng *") r) 
    ((-gptr- "const gsl_ran_discrete_t *") g) 
    (int #{ gsl_ran_discrete (  $r ,$g) #} )                ;; size_t -> int
)

(de gsl_ran_discrete_pdf (    k   g )
    ((-int-) k)                     ;; size_t -> int
    ((-gptr- "const gsl_ran_discrete_t *") g) 
    (double #{ gsl_ran_discrete_pdf (  $k ,$g) #} )
)

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

(dhc-make ()
  dummy_randist
  gsl_ran_bernoulli
  gsl_ran_bernoulli_pdf
  gsl_ran_beta
  gsl_ran_beta_pdf
  gsl_ran_binomial
  gsl_ran_binomial_pdf
  gsl_ran_exponential
  gsl_ran_exponential_pdf
  gsl_ran_exppow
  gsl_ran_exppow_pdf
  gsl_ran_cauchy
  gsl_ran_cauchy_pdf
  gsl_ran_chisq
  gsl_ran_chisq_pdf
  gsl_ran_erlang
  gsl_ran_erlang_pdf
  gsl_ran_fdist
  gsl_ran_fdist_pdf
  gsl_ran_flat
  gsl_ran_flat_pdf
  gsl_ran_gamma
  gsl_ran_gamma_int
  gsl_ran_gamma_pdf
  gsl_ran_gaussian
  gsl_ran_gaussian_ratio_method
  gsl_ran_gaussian_pdf
  gsl_ran_ugaussian
  gsl_ran_ugaussian_ratio_method
  gsl_ran_ugaussian_pdf
  gsl_ran_gaussian_tail
  gsl_ran_gaussian_tail_pdf
  gsl_ran_ugaussian_tail
  gsl_ran_ugaussian_tail_pdf
  gsl_ran_bivariate_gaussian
  gsl_ran_bivariate_gaussian_pdf
  gsl_ran_landau
  gsl_ran_landau_pdf
  gsl_ran_geometric
  gsl_ran_geometric_pdf
  gsl_ran_hypergeometric
  gsl_ran_hypergeometric_pdf
  gsl_ran_gumbel1
  gsl_ran_gumbel1_pdf
  gsl_ran_gumbel2
  gsl_ran_gumbel2_pdf
  gsl_ran_logistic
  gsl_ran_logistic_pdf
  gsl_ran_lognormal
  gsl_ran_lognormal_pdf
  gsl_ran_logarithmic
  gsl_ran_logarithmic_pdf
  gsl_ran_negative_binomial
  gsl_ran_negative_binomial_pdf
  gsl_ran_pascal
  gsl_ran_pascal_pdf
  gsl_ran_pareto
  gsl_ran_pareto_pdf
  gsl_ran_poisson
  gsl_ran_poisson_array
  gsl_ran_poisson_pdf
  gsl_ran_rayleigh
  gsl_ran_rayleigh_pdf
  gsl_ran_rayleigh_tail
  gsl_ran_rayleigh_tail_pdf
  gsl_ran_tdist
  gsl_ran_tdist_pdf
  gsl_ran_laplace
  gsl_ran_laplace_pdf
  gsl_ran_levy
  gsl_ran_levy_skew
  gsl_ran_weibull
  gsl_ran_weibull_pdf
  gsl_ran_dir_2d
  gsl_ran_dir_2d_trig_method
  gsl_ran_dir_3d
  gsl_ran_dir_nd
  gsl_ran_shuffle
  gsl_ran_choose
  gsl_ran_sample
  gsl_ran_discrete_preproc
  gsl_ran_discrete_free
  gsl_ran_discrete
  gsl_ran_discrete_pdf
)
