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



#? *** combination

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

#? * (dummy_combination)
#? * (gsl_combination_alloc <n> <k>)
#? * (gsl_combination_calloc <n> <k>)
#? * (gsl_combination_init_first <c>)
#? * (gsl_combination_init_last <c>)
#? * (gsl_combination_free <c>)
#? * (gsl_combination_fread <stream> <c>)
#? * (gsl_combination_fwrite <stream> <c>)
#? * (gsl_combination_fscanf <stream> <c>)
#? * (gsl_combination_fprintf <stream> <c> <format>)
#? * (gsl_combination_n <c>)
#? * (gsl_combination_k <c>)
#? * (gsl_combination_data <c>)
#? * (gsl_combination_get <c> <i>)
#? * (gsl_combination_valid <c>)
#? * (gsl_combination_next <c>)
#? * (gsl_combination_prev <c>)

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



(de gsl_combination_alloc (    n  k )
    ((-int-) n)                     ;; size_t -> int
    ((-int-) k)                     ;; size_t -> int
    (gptr #{ gsl_combination_alloc (  $n ,$k) #} )          ;; gsl_combination * -> gptr
)

(de gsl_combination_calloc (    n  k )
    ((-int-) n)                     ;; size_t -> int
    ((-int-) k)                     ;; size_t -> int
    (gptr #{ gsl_combination_calloc (  $n ,$k) #} )          ;; gsl_combination * -> gptr
)

(de gsl_combination_init_first (    c )
    ((-gptr- "gsl_combination *") c) 
    #{ gsl_combination_init_first (  $c) #} 
    ()
)

(de gsl_combination_init_last (    c )
    ((-gptr- "gsl_combination *") c) 
    #{ gsl_combination_init_last (  $c) #} 
    ()
)

(de gsl_combination_free (    c )
    ((-gptr- "gsl_combination *") c) 
    #{ gsl_combination_free (  $c) #} 
    ()
)


(de gsl_combination_fread (    stream  c )
    ((-gptr- "FILE *") stream) 
    ((-gptr- "gsl_combination *") c) 
    (int #{ gsl_combination_fread (  $stream ,$c) #} )
)

(de gsl_combination_fwrite (    stream  c )
    ((-gptr- "FILE *") stream) 
    ((-gptr- "const gsl_combination *") c) 
    (int #{ gsl_combination_fwrite (  $stream ,$c) #} )
)

(de gsl_combination_fscanf (    stream  c )
    ((-gptr- "FILE *") stream) 
    ((-gptr- "gsl_combination *") c) 
    (int #{ gsl_combination_fscanf (  $stream ,$c) #} )
)

(de gsl_combination_fprintf (    stream  c   format )
    ((-gptr- "FILE *") stream) 
    ((-gptr- "const gsl_combination *") c) 
    ((-gptr- "const char *") format) 
    (int #{ gsl_combination_fprintf (  $stream ,$c ,$format) #} )
)


(de gsl_combination_n (    c )
    ((-gptr- "const gsl_combination *") c) 
    (int #{ gsl_combination_n (  $c) #} )                ;; size_t -> int
)

(de gsl_combination_k (    c )
    ((-gptr- "const gsl_combination *") c) 
    (int #{ gsl_combination_k (  $c) #} )                ;; size_t -> int
)

(de gsl_combination_data (    c )
    ((-gptr- "const gsl_combination *") c) 
    (gptr #{ gsl_combination_data (  $c) #} )          ;; size_t * -> gptr
)


(de gsl_combination_get (    c  i )
    ((-gptr- "const gsl_combination *") c) 
    ((-int-) i)                     ;; size_t -> int
    (int #{ gsl_combination_get (  $c ,$i) #} )                ;; size_t -> int
)


(de gsl_combination_valid (    c )
    ((-gptr- "gsl_combination *") c) 
    (int #{ gsl_combination_valid (  $c) #} )
)

(de gsl_combination_next (    c )
    ((-gptr- "gsl_combination *") c) 
    (int #{ gsl_combination_next (  $c) #} )
)

(de gsl_combination_prev (    c )
    ((-gptr- "gsl_combination *") c) 
    (int #{ gsl_combination_prev (  $c) #} )
)



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

(dhc-make ()
  dummy_combination
  gsl_combination_alloc
  gsl_combination_calloc
  gsl_combination_init_first
  gsl_combination_init_last
  gsl_combination_free
  gsl_combination_fread
  gsl_combination_fwrite
  gsl_combination_fscanf
  gsl_combination_fprintf
  gsl_combination_n
  gsl_combination_k
  gsl_combination_data
  gsl_combination_get
  gsl_combination_valid
  gsl_combination_next
  gsl_combination_prev
)
