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



#? *** linalg

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

#? * (dummy_linalg)
#? * (gsl_linalg_matmult <a> <b> <c>)
#? * (gsl_linalg_matmult_mod <a> <moda> <b> <modb> <c>)
#? * (gsl_linalg_exponential_ss <a> <ea> <mode>)
#? * (gsl_linalg_householder_transform <v>)
#? * (gsl_linalg_complex_householder_transform <v> <result>)
#? * (gsl_linalg_householder_hm <tau> <v> <a>)
#? * (gsl_linalg_householder_mh <tau> <v> <a>)
#? * (gsl_linalg_householder_hv <tau> <v> <w>)
#? * (gsl_linalg_householder_hm1 <tau> <a>)
#? * (gsl_linalg_complex_householder_hm <tau> <v> <a>)
#? * (gsl_linalg_sv_decomp <a> <v> <s> <work>)
#? * (gsl_linalg_sv_decomp_mod <a> <x> <v> <s> <work>)
#? * (gsl_linalg_sv_decomp_jacobi <a> <q> <s>)
#? * (gsl_linalg_sv_solve <u> <q> <s> <b> <x>)
#? * (gsl_linalg_lu_decomp <a> <p> <signum>)
#? * (gsl_linalg_lu_solve <lu> <p> <b> <x>)
#? * (gsl_linalg_lu_svx <lu> <p> <x>)
#? * (gsl_linalg_lu_refine <a> <lu> <p> <b> <x> <residual>)
#? * (gsl_linalg_lu_invert <lu> <p> <inverse>)
#? * (gsl_linalg_lu_det <lu> <signum>)
#? * (gsl_linalg_lu_lndet <lu>)
#? * (gsl_linalg_lu_sgndet <lu> <signum>)
#? * (gsl_linalg_complex_lu_decomp <a> <p> <signum>)
#? * (gsl_linalg_complex_lu_solve <lu> <p> <b> <x>)
#? * (gsl_linalg_complex_lu_svx <lu> <p> <x>)
#? * (gsl_linalg_complex_lu_refine <a> <lu> <p> <b> <x> <residual>)
#? * (gsl_linalg_complex_lu_invert <lu> <p> <inverse>)
#? * (gsl_linalg_complex_lu_det <lu> <signum> <result>)
#? * (gsl_linalg_complex_lu_lndet <lu>)
#? * (gsl_linalg_complex_lu_sgndet <lu> <signum> <result>)
#? * (gsl_linalg_qr_decomp <a> <tau>)
#? * (gsl_linalg_qr_solve <qr> <tau> <b> <x>)
#? * (gsl_linalg_qr_svx <qr> <tau> <x>)
#? * (gsl_linalg_qr_lssolve <qr> <tau> <b> <x> <residual>)
#? * (gsl_linalg_qr_qrsolve <q> <r> <b> <x>)
#? * (gsl_linalg_qr_rsolve <qr> <b> <x>)
#? * (gsl_linalg_qr_rsvx <qr> <x>)
#? * (gsl_linalg_qr_update <q> <r> <w> <v>)
#? * (gsl_linalg_qr_qtvec <qr> <tau> <v>)
#? * (gsl_linalg_qr_qvec <qr> <tau> <v>)
#? * (gsl_linalg_qr_unpack <qr> <tau> <q> <r>)
#? * (gsl_linalg_r_solve <r> <b> <x>)
#? * (gsl_linalg_r_svx <r> <x>)
#? * (gsl_linalg_qrpt_decomp <a> <tau> <p> <signum> <norm>)
#? * (gsl_linalg_qrpt_decomp2 <a> <q> <r> <tau> <p> <signum> <norm>)
#? * (gsl_linalg_qrpt_solve <qr> <tau> <p> <b> <x>)
#? * (gsl_linalg_qrpt_svx <qr> <tau> <p> <x>)
#? * (gsl_linalg_qrpt_qrsolve <q> <r> <p> <b> <x>)
#? * (gsl_linalg_qrpt_rsolve <qr> <p> <b> <x>)
#? * (gsl_linalg_qrpt_rsvx <qr> <p> <x>)
#? * (gsl_linalg_qrpt_update <q> <r> <p> <u> <v>)
#? * (gsl_linalg_cholesky_decomp <a>)
#? * (gsl_linalg_cholesky_solve <cholesky> <b> <x>)
#? * (gsl_linalg_cholesky_svx <cholesky> <x>)
#? * (gsl_linalg_symmtd_decomp <a> <tau>)
#? * (gsl_linalg_symmtd_unpack <a> <tau> <q> <diag> <subdiag>)
#? * (gsl_linalg_symmtd_unpack_t <a> <diag> <subdiag>)
#? * (gsl_linalg_hermtd_decomp <a> <tau>)
#? * (gsl_linalg_hermtd_unpack <a> <tau> <q> <diag> <sudiag>)
#? * (gsl_linalg_hermtd_unpack_t <a> <diag> <subdiag>)
#? * (gsl_linalg_hh_solve <a> <b> <x>)
#? * (gsl_linalg_hh_svx <a> <x>)
#? * (gsl_linalg_solve_symm_tridiag <diag> <offdiag> <b> <x>)
#? * (gsl_linalg_solve_symm_cyc_tridiag <diag> <offdiag> <b> <x>)
#? * (gsl_linalg_bidiag_decomp <a> <tau_u> <tau_v>)
#? * (gsl_linalg_bidiag_unpack <a> <tau_u> <u> <tau_v> <v> <diag> <superdiag>)
#? * (gsl_linalg_bidiag_unpack2 <a> <tau_u> <tau_v> <v>)
#? * (gsl_linalg_bidiag_unpack_b <a> <diag> <superdiag>)
#? * (gsl_linalg_balance_columns <a> <d>)

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


(de gsl_linalg_matmult (    a  b  c )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "const gsl_matrix *") b) 
    ((-gptr- "gsl_matrix *") c) 
    (int #{ gsl_linalg_matmult (  $a ,$b ,$c) #} )
)




(de gsl_linalg_matmult_mod (    a  moda  b  modb  c )
    ((-gptr- "const gsl_matrix *") a) 
    ((-int-) moda)                           ;; gsl_linalg_matrix_mod_t (enum) -> int
    ((-gptr- "const gsl_matrix *") b) 
    ((-int-) modb)                           ;; gsl_linalg_matrix_mod_t (enum) -> int
    ((-gptr- "gsl_matrix *") c) 
    (int #{ gsl_linalg_matmult_mod (  $a ,$moda ,$b ,$modb ,$c) #} )
)


(if (> gsl-libversion 1.0)
    (de gsl_linalg_exponential_ss (    a  ea  mode  )
      ((-gptr- "const gsl_matrix *") a) 
      ((-gptr- "gsl_matrix *") ea) 
      ((-int-) mode) ;; gsl_mode_t (unsigned int) -> int
      (int #{ gsl_linalg_exponential_ss(  $a ,$ea ,$mode ) #} ))
  (de gsl_linalg_exponential_ss (    a  ea  mode  )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "gsl_matrix *") ea) 
    ((-int-) mode) ;; gsl_mode_t (unsigned int) -> int
    (error "not available in this version of GSL") ()))



(de gsl_linalg_householder_transform (    v )
    ((-gptr- "gsl_vector *") v) 
    (double #{ gsl_linalg_householder_transform (  $v) #} )
)

(de gsl_linalg_complex_householder_transform (    v  result)
    ((-gptr- "gsl_vector_complex *") v) 
    ((-gptr- "gsl_complex *") result)
    #{ {
    gsl_complex tmp;
    tmp = gsl_linalg_complex_householder_transform (  $v);
    memcpy($result, &tmp, sizeof(gsl_complex));
    } #} 
    ()
)


(de gsl_linalg_householder_hm (    tau  v  a )
    ((-double-) tau) 
    ((-gptr- "const gsl_vector *") v) 
    ((-gptr- "gsl_matrix *") a) 
    (int #{ gsl_linalg_householder_hm (  $tau ,$v ,$a) #} )
)


(de gsl_linalg_householder_mh (    tau  v  a )
    ((-double-) tau) 
    ((-gptr- "const gsl_vector *") v) 
    ((-gptr- "gsl_matrix *") a) 
    (int #{ gsl_linalg_householder_mh (  $tau ,$v ,$a) #} )
)


(de gsl_linalg_householder_hv (    tau  v  w )
    ((-double-) tau) 
    ((-gptr- "const gsl_vector *") v) 
    ((-gptr- "gsl_vector *") w) 
    (int #{ gsl_linalg_householder_hv (  $tau ,$v ,$w) #} )
)


(de gsl_linalg_householder_hm1 (    tau  a )
    ((-double-) tau) 
    ((-gptr- "gsl_matrix *") a) 
    (int #{ gsl_linalg_householder_hm1 (  $tau ,$a) #} )
)


(de gsl_linalg_complex_householder_hm (    tau  v  a )
    ((-gptr- "gsl_complex *") tau)                       ;; gsl_complex (structure) -> pointer
    ((-gptr- "const gsl_vector_complex *") v) 
    ((-gptr- "gsl_matrix_complex *") a) 
    (int #{ gsl_linalg_complex_householder_hm (  *$tau ,$v ,$a) #} )
)




(de gsl_linalg_sv_decomp (    a  v  s  work )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_matrix *") v) 
    ((-gptr- "gsl_vector *") s) 
    ((-gptr- "gsl_vector *") work) 
    (int #{ gsl_linalg_SV_decomp (  $a ,$v ,$s ,$work) #} )
)


(de gsl_linalg_sv_decomp_mod (    a  x  v  s  work )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_matrix *") x) 
    ((-gptr- "gsl_matrix *") v) 
    ((-gptr- "gsl_vector *") s) 
    ((-gptr- "gsl_vector *") work) 
    (int #{ gsl_linalg_SV_decomp_mod (  $a ,$x ,$v ,$s ,$work) #} )
)


(de gsl_linalg_sv_decomp_jacobi (    a  q  s )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_vector *") s) 
    (int #{ gsl_linalg_SV_decomp_jacobi (  $a ,$q ,$s) #} )
)


(de gsl_linalg_sv_solve (    u  q  s  b  x )
    ((-gptr- "const gsl_matrix *") u) 
    ((-gptr- "const gsl_matrix *") q) 
    ((-gptr- "const gsl_vector *") s) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_SV_solve (  $u ,$q ,$s ,$b ,$x) #} )
)





(de gsl_linalg_lu_decomp (    a  p   signum )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_permutation *") p) 
    ((-gptr- "int *") signum) 
    (int #{ gsl_linalg_LU_decomp (  $a ,$p ,$signum) #} )
)


(de gsl_linalg_lu_solve (    lu  p  b  x )
    ((-gptr- "const gsl_matrix *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_LU_solve (  $lu ,$p ,$b ,$x) #} )
)


(de gsl_linalg_lu_svx (    lu  p  x )
    ((-gptr- "const gsl_matrix *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_LU_svx (  $lu ,$p ,$x) #} )
)


(de gsl_linalg_lu_refine (    a  lu  p  b  x  residual )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "const gsl_matrix *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    ((-gptr- "gsl_vector *") residual) 
    (int #{ gsl_linalg_LU_refine (  $a ,$lu ,$p ,$b ,$x ,$residual) #} )
)


(de gsl_linalg_lu_invert (    lu  p  inverse )
    ((-gptr- "const gsl_matrix *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_matrix *") inverse) 
    (int #{ gsl_linalg_LU_invert (  $lu ,$p ,$inverse) #} )
)


(de gsl_linalg_lu_det (    lu  signum )
    ((-gptr- "gsl_matrix *") lu) 
    ((-int-) signum) 
    (double #{ gsl_linalg_LU_det (  $lu ,$signum) #} )
)

(de gsl_linalg_lu_lndet (    lu )
    ((-gptr- "gsl_matrix *") lu) 
    (double #{ gsl_linalg_LU_lndet (  $lu) #} )
)

(de gsl_linalg_lu_sgndet (    lu  signum )
    ((-gptr- "gsl_matrix *") lu) 
    ((-int-) signum) 
    (int #{ gsl_linalg_LU_sgndet (  $lu ,$signum) #} )
)




(de gsl_linalg_complex_lu_decomp (    a  p   signum )
    ((-gptr- "gsl_matrix_complex *") a) 
    ((-gptr- "gsl_permutation *") p) 
    ((-gptr- "int *") signum) 
    (int #{ gsl_linalg_complex_LU_decomp (  $a ,$p ,$signum) #} )
)


(de gsl_linalg_complex_lu_solve (    lu  p  b  x )
    ((-gptr- "const gsl_matrix_complex *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector_complex *") b) 
    ((-gptr- "gsl_vector_complex *") x) 
    (int #{ gsl_linalg_complex_LU_solve (  $lu ,$p ,$b ,$x) #} )
)


(de gsl_linalg_complex_lu_svx (    lu  p  x )
    ((-gptr- "const gsl_matrix_complex *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_vector_complex *") x) 
    (int #{ gsl_linalg_complex_LU_svx (  $lu ,$p ,$x) #} )
)


(de gsl_linalg_complex_lu_refine (    a  lu  p  b  x  residual )
    ((-gptr- "const gsl_matrix_complex *") a) 
    ((-gptr- "const gsl_matrix_complex *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector_complex *") b) 
    ((-gptr- "gsl_vector_complex *") x) 
    ((-gptr- "gsl_vector_complex *") residual) 
    (int #{ gsl_linalg_complex_LU_refine (  $a ,$lu ,$p ,$b ,$x ,$residual) #} )
)


(de gsl_linalg_complex_lu_invert (    lu  p  inverse )
    ((-gptr- "const gsl_matrix_complex *") lu) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_matrix_complex *") inverse) 
    (int #{ gsl_linalg_complex_LU_invert (  $lu ,$p ,$inverse) #} )
)


(if (> gsl-libversion 1.0)
    (progn
      (de gsl_linalg_complex_lu_det (    lu  signum  result)
	((-gptr- "gsl_matrix_complex *") lu) 
	((-int-) signum) 
	((-gptr- "gsl_complex *") result)
					#{ {
	gsl_complex tmp			;
	tmp = gsl_linalg_complex_LU_det(  $lu ,$signum) ;
	memcpy($result, &tmp, sizeof(gsl_complex)) ;
	} #} 
	())
  (de gsl_linalg_complex_lu_lndet (    lu )
    ((-gptr- "gsl_matrix_complex *") lu) 
    (double #{ gsl_linalg_complex_LU_lndet(  $lu) #} ))
  (de gsl_linalg_complex_lu_sgndet (    lu  signum  result)
    ((-gptr- "gsl_matrix_complex *") lu) 
    ((-int-) signum) 
    ((-gptr- "gsl_complex *") result)
    #{ {
    gsl_complex tmp;
    tmp = gsl_linalg_complex_LU_sgndet(  $lu ,$signum);
    memcpy($result, &tmp, sizeof(gsl_complex));
    } #} 
    ()))
  (de gsl_linalg_complex_lu_det (    lu  signum  result)
      ((-gptr- "gsl_matrix_complex *") lu) 
      ((-int-) signum) 
      ((-gptr- "gsl_complex *") result)
      (error "not available in this version of GSL") ()))
    (de gsl_linalg_complex_lu_lndet (    lu )
    ((-gptr- "gsl_matrix_complex *") lu) 
    (error "not available in this version of GSL") ()))
  (de gsl_linalg_complex_lu_sgndet (    lu  signum  result)
    ((-gptr- "gsl_matrix_complex *") lu) 
    ((-int-) signum) 
    ((-gptr- "gsl_complex *") result)
    (error "not available in this version of GSL") ()))







(de gsl_linalg_qr_decomp (    a  tau )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") tau) 
    (int #{ gsl_linalg_QR_decomp (  $a ,$tau) #} )
)


(de gsl_linalg_qr_solve (    qr  tau  b  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QR_solve (  $qr ,$tau ,$b ,$x) #} )
)


(de gsl_linalg_qr_svx (    qr  tau  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QR_svx (  $qr ,$tau ,$x) #} )
)


(de gsl_linalg_qr_lssolve (    qr  tau  b  x  residual )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    ((-gptr- "gsl_vector *") residual) 
    (int #{ gsl_linalg_QR_lssolve (  $qr ,$tau ,$b ,$x ,$residual) #} )
)



(de gsl_linalg_qr_qrsolve (    q  r  b  x )
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_matrix *") r) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QR_QRsolve (  $q ,$r ,$b ,$x) #} )
)


(de gsl_linalg_qr_rsolve (    qr  b  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QR_Rsolve (  $qr ,$b ,$x) #} )
)


(de gsl_linalg_qr_rsvx (    qr  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QR_Rsvx (  $qr ,$x) #} )
)


(de gsl_linalg_qr_update (    q  r  w  v )
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_matrix *") r) 
    ((-gptr- "gsl_vector *") w) 
    ((-gptr- "const gsl_vector *") v) 
    (int #{ gsl_linalg_QR_update (  $q ,$r ,$w ,$v) #} )
)


(de gsl_linalg_qr_qTvec (    qr  tau  v )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "gsl_vector *") v) 
    (int #{ gsl_linalg_QR_QTvec (  $qr ,$tau ,$v) #} )
)


(de gsl_linalg_qr_qvec (    qr  tau  v )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "gsl_vector *") v) 
    (int #{ gsl_linalg_QR_Qvec (  $qr ,$tau ,$v) #} )
)


(de gsl_linalg_qr_unpack (    qr  tau  q  r )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_matrix *") r) 
    (int #{ gsl_linalg_QR_unpack (  $qr ,$tau ,$q ,$r) #} )
)


(de gsl_linalg_r_solve (    r  b  x )
    ((-gptr- "const gsl_matrix *") r) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_R_solve (  $r ,$b ,$x) #} )
)


(de gsl_linalg_r_svx (    r  x )
    ((-gptr- "const gsl_matrix *") r) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_R_svx (  $r ,$x) #} )
)





(de gsl_linalg_qrPT_decomp (    a  tau  p   signum  norm )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") tau) 
    ((-gptr- "gsl_permutation *") p) 
    ((-gptr- "int *") signum) 
    ((-gptr- "gsl_vector *") norm) 
    (int #{ gsl_linalg_QRPT_decomp (  $a ,$tau ,$p ,$signum ,$norm) #} )
)


(de gsl_linalg_qrPT_decomp2 (    a  q  r  tau  p   signum  norm )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_matrix *") r) 
    ((-gptr- "gsl_vector *") tau) 
    ((-gptr- "gsl_permutation *") p) 
    ((-gptr- "int *") signum) 
    ((-gptr- "gsl_vector *") norm) 
    (int #{ gsl_linalg_QRPT_decomp2 (  $a ,$q ,$r ,$tau ,$p ,$signum ,$norm) #} )
)


(de gsl_linalg_qrPT_solve (    qr  tau  p  b  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QRPT_solve (  $qr ,$tau ,$p ,$b ,$x) #} )
)



(de gsl_linalg_qrPT_svx (    qr  tau  p  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QRPT_svx (  $qr ,$tau ,$p ,$x) #} )
)


(de gsl_linalg_qrPT_qrsolve (    q  r  p  b  x )
    ((-gptr- "const gsl_matrix *") q) 
    ((-gptr- "const gsl_matrix *") r) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QRPT_QRsolve (  $q ,$r ,$p ,$b ,$x) #} )
)


(de gsl_linalg_qrPT_rsolve (    qr  p  b  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QRPT_Rsolve (  $qr ,$p ,$b ,$x) #} )
)


(de gsl_linalg_qrPT_rsvx (    qr  p  x )
    ((-gptr- "const gsl_matrix *") qr) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_QRPT_Rsvx (  $qr ,$p ,$x) #} )
)


(de gsl_linalg_qrPT_update (    q  r  p  u  v )
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_matrix *") r) 
    ((-gptr- "const gsl_permutation *") p) 
    ((-gptr- "gsl_vector *") u) 
    ((-gptr- "const gsl_vector *") v) 
    (int #{ gsl_linalg_QRPT_update (  $q ,$r ,$p ,$u ,$v) #} )
)




(de gsl_linalg_cholesky_decomp (    a )
    ((-gptr- "gsl_matrix *") a) 
    (int #{ gsl_linalg_cholesky_decomp (  $a) #} )
)


(de gsl_linalg_cholesky_solve (    cholesky  b  x )
    ((-gptr- "const gsl_matrix *") cholesky) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_cholesky_solve (  $cholesky ,$b ,$x) #} )
)


(de gsl_linalg_cholesky_svx (    cholesky  x )
    ((-gptr- "const gsl_matrix *") cholesky) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_cholesky_svx (  $cholesky ,$x) #} )
)




(de gsl_linalg_symmtd_decomp (    a  tau )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") tau) 
    (int #{ gsl_linalg_symmtd_decomp (  $a ,$tau) #} )
)


(de gsl_linalg_symmtd_unpack (    a  tau  q  diag  subdiag )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "const gsl_vector *") tau) 
    ((-gptr- "gsl_matrix *") q) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") subdiag) 
    (int #{ gsl_linalg_symmtd_unpack (  $a ,$tau ,$q ,$diag ,$subdiag) #} )
)


(de gsl_linalg_symmtd_unpack_T (    a  diag  subdiag )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") subdiag) 
    (int #{ gsl_linalg_symmtd_unpack_T (  $a ,$diag ,$subdiag) #} )
)




(de gsl_linalg_hermtd_decomp (    a  tau )
    ((-gptr- "gsl_matrix_complex *") a) 
    ((-gptr- "gsl_vector_complex *") tau) 
    (int #{ gsl_linalg_hermtd_decomp (  $a ,$tau) #} )
)


(de gsl_linalg_hermtd_unpack (    a  tau  q  diag  sudiag )
    ((-gptr- "const gsl_matrix_complex *") a) 
    ((-gptr- "const gsl_vector_complex *") tau) 
    ((-gptr- "gsl_matrix_complex *") q) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") sudiag) 
    (int #{ gsl_linalg_hermtd_unpack (  $a ,$tau ,$q ,$diag ,$sudiag) #} )
)


(de gsl_linalg_hermtd_unpack_T (    a  diag  subdiag )
    ((-gptr- "const gsl_matrix_complex *") a) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") subdiag) 
    (int #{ gsl_linalg_hermtd_unpack_T (  $a ,$diag ,$subdiag) #} )
)




(de gsl_linalg_HH_solve (    a  b  x )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_HH_solve (  $a ,$b ,$x) #} )
)

(de gsl_linalg_HH_svx (    a  x )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_HH_svx (  $a ,$x) #} )
)



(de gsl_linalg_solve_symm_tridiag (    diag  offdiag  b  x )
    ((-gptr- "const gsl_vector *") diag) 
    ((-gptr- "const gsl_vector *") offdiag) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_solve_symm_tridiag (  $diag ,$offdiag ,$b ,$x) #} )
)




(de gsl_linalg_solve_symm_cyc_tridiag (    diag  offdiag  b  x )
    ((-gptr- "const gsl_vector *") diag) 
    ((-gptr- "const gsl_vector *") offdiag) 
    ((-gptr- "const gsl_vector *") b) 
    ((-gptr- "gsl_vector *") x) 
    (int #{ gsl_linalg_solve_symm_cyc_tridiag (  $diag ,$offdiag ,$b ,$x) #} )
)





(de gsl_linalg_bidiag_decomp (    a  tau_u  tau_v )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") tau_u) 
    ((-gptr- "gsl_vector *") tau_v) 
    (int #{ gsl_linalg_bidiag_decomp (  $a ,$tau_u ,$tau_v) #} )
)


(de gsl_linalg_bidiag_unpack (    a  tau_u  u  tau_v  v  diag  superdiag )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "const gsl_vector *") tau_u) 
    ((-gptr- "gsl_matrix *") u) 
    ((-gptr- "const gsl_vector *") tau_v) 
    ((-gptr- "gsl_matrix *") v) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") superdiag) 
    (int #{ gsl_linalg_bidiag_unpack (  $a ,$tau_u ,$u ,$tau_v ,$v ,$diag ,$superdiag) #} )
)


(de gsl_linalg_bidiag_unpack2 (    a  tau_u  tau_v  v )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") tau_u) 
    ((-gptr- "gsl_vector *") tau_v) 
    ((-gptr- "gsl_matrix *") v) 
    (int #{ gsl_linalg_bidiag_unpack2 (  $a ,$tau_u ,$tau_v ,$v) #} )
)


(de gsl_linalg_bidiag_unpack_b (    a  diag  superdiag )
    ((-gptr- "const gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") diag) 
    ((-gptr- "gsl_vector *") superdiag) 
    (int #{ gsl_linalg_bidiag_unpack_B (  $a ,$diag ,$superdiag) #} )
)




(de gsl_linalg_balance_columns (    a  d )
    ((-gptr- "gsl_matrix *") a) 
    ((-gptr- "gsl_vector *") d) 
    (int #{ gsl_linalg_balance_columns (  $a ,$d) #} )
)


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

(dhc-make ()
  dummy_linalg
  gsl_linalg_matmult
  gsl_linalg_matmult_mod
  gsl_linalg_exponential_ss
  gsl_linalg_householder_transform
  gsl_linalg_complex_householder_transform
  gsl_linalg_householder_hm
  gsl_linalg_householder_mh
  gsl_linalg_householder_hv
  gsl_linalg_householder_hm1
  gsl_linalg_complex_householder_hm
  gsl_linalg_sv_decomp
  gsl_linalg_sv_decomp_mod
  gsl_linalg_sv_decomp_jacobi
  gsl_linalg_sv_solve
  gsl_linalg_lu_decomp
  gsl_linalg_lu_det
  gsl_linalg_lu_lndet
  gsl_linalg_lu_solve
  gsl_linalg_lu_svx
  gsl_linalg_lu_refine
  gsl_linalg_lu_invert
  gsl_linalg_lu_sgndet
  gsl_linalg_complex_lu_decomp
  gsl_linalg_complex_lu_solve
  gsl_linalg_complex_lu_svx
  gsl_linalg_complex_lu_refine
  gsl_linalg_complex_lu_invert
  gsl_linalg_complex_lu_det
  gsl_linalg_complex_lu_lndet
  gsl_linalg_complex_lu_sgndet
  gsl_linalg_qr_decomp
  gsl_linalg_qr_solve
  gsl_linalg_qr_svx
  gsl_linalg_qr_lssolve
  gsl_linalg_qr_qrsolve
  gsl_linalg_qr_rsolve
  gsl_linalg_qr_rsvx
  gsl_linalg_qr_update
  gsl_linalg_qr_qtvec
  gsl_linalg_qr_qvec
  gsl_linalg_qr_unpack
  gsl_linalg_r_solve
;;  gsl_linalg_r_svx
  gsl_linalg_qrpt_decomp
  gsl_linalg_qrpt_decomp2
  gsl_linalg_qrpt_solve
  gsl_linalg_qrpt_svx
  gsl_linalg_qrpt_qrsolve
  gsl_linalg_qrpt_rsolve
  gsl_linalg_qrpt_rsvx
  gsl_linalg_qrpt_update
  gsl_linalg_cholesky_decomp
  gsl_linalg_cholesky_solve
  gsl_linalg_cholesky_svx
  gsl_linalg_symmtd_decomp
  gsl_linalg_symmtd_unpack
  gsl_linalg_symmtd_unpack_t
  gsl_linalg_hermtd_decomp
  gsl_linalg_hermtd_unpack
  gsl_linalg_hermtd_unpack_t
  gsl_linalg_hh_solve
  gsl_linalg_hh_svx
  gsl_linalg_solve_symm_tridiag
  gsl_linalg_solve_symm_cyc_tridiag
  gsl_linalg_bidiag_decomp
  gsl_linalg_bidiag_unpack
  gsl_linalg_bidiag_unpack2
  gsl_linalg_bidiag_unpack_b
  gsl_linalg_balance_columns
)

