Commit 1a2ebe96 authored by Liam Healy's avatar Liam Healy

Array input and output declarations

A somewhat comprhensive attempt to make sure :inputs, :outputs, and
:return arguments in defmfuns match what the function is expecting and
will return, so that non-native implementations will work correctly
for copying, and native ones will work correctly for pinning.  The
:return argument now defaults to :outputs in most circumstances.
parent bca08efd
;; Permutations
;; Liam Healy, Sun Mar 26 2006 - 11:51
;; Time-stamp: <2008-12-06 19:03:50EST permutation.lisp>
;; Time-stamp: <2008-12-07 18:17:57EST permutation.lisp>
;; $Id$
(in-package :gsl)
......@@ -50,7 +50,6 @@
(((mpointer permutation) :pointer))
:definition :method
:c-return :void
:inputs (permutation)
:outputs (permutation)
:return (permutation)
:documentation ; FDL
......@@ -64,6 +63,7 @@
:definition :method
:inputs (source)
:outputs (destination)
:return (destination)
:documentation ; FDL
"Copy the elements of the permutation source into the
permutation destination. The two permutations must have the same size.")
......@@ -74,6 +74,7 @@
:definition :method
:inputs (p)
:outputs (p)
:return (p)
:documentation ; FDL
"Exchanges the ith and jth elements of the permutation p.")
......@@ -85,6 +86,7 @@
"gsl_permutation_size"
(((mpointer p) :pointer))
:c-return sizet
:inputs (p)
:documentation ; FDL
"The size of the permutation p.")
......@@ -92,6 +94,7 @@
"gsl_permutation_data"
(((mpointer p) :pointer))
:c-return :pointer
:inputs (p)
:documentation ; FDL
"A pointer to the array of elements in the
permutation p.")
......@@ -105,6 +108,7 @@
(((mpointer permutation) :pointer))
:definition :method
:c-return :boolean
:inputs (permutation)
:documentation ; FDL
"Check that the permutation p is valid. The n
elements should contain each of the numbers 0 to n-1 once and only
......@@ -117,15 +121,19 @@
(defmfun permutation-reverse (p)
"gsl_permutation_reverse"
(((mpointer p) :pointer))
:outputs (p)
:c-return :void
:inputs (p)
:outputs (p)
:return (p)
:documentation ; FDL
"Reverse the order of the elements of the permutation p.")
(defmfun permutation-inverse (inv p)
"gsl_permutation_inverse"
(((mpointer inv) :pointer) ((mpointer p) :pointer))
:inputs (p)
:outputs (inv)
:return (inv)
:documentation ; FDL
"Find the inverse of the permutation p.")
......@@ -133,7 +141,9 @@
"gsl_permutation_next"
(((mpointer p) :pointer))
:c-return :success-failure
:inputs (p)
:outputs (p)
:return (p :c-return)
:documentation ; FDL
"Advance the permutation p to the next permutation
in lexicographic order and return p and T. If no further
......@@ -146,7 +156,9 @@
"gsl_permutation_prev"
(((mpointer p) :pointer))
:c-return :success-failure
:inputs (p)
:outputs (p)
:return (p :c-return)
:documentation ; FDL
"Step backwards from the permutation p to the
previous permutation in lexicographic order, returning p and T.
......@@ -160,6 +172,9 @@
(defmfun permute (p data stride n)
"gsl_permute"
(((mpointer p) :pointer) (data :pointer) (stride sizet) (n sizet))
:inputs (p data)
:outputs (data)
:return (data)
:documentation ; FDL
"Apply the permutation p to the array data of
size n with stride stride.")
......@@ -167,6 +182,9 @@
(defmfun permute-inverse (p data stride n)
"gsl_permute_inverse"
(((mpointer p) :pointer) (data :pointer) (stride sizet) (n sizet))
:inputs (p data)
:outputs (data)
:return (data)
:documentation ; FDL
"Apply the inverse of the permutation p to the array data of
size n with stride.")
......@@ -175,7 +193,9 @@
("gsl_permute_vector" :type)
(((mpointer p) :pointer) ((mpointer v) :pointer))
:definition :generic
:inputs (p v)
:outputs (v)
:return (v)
:documentation ; FDL
"Apply the permutation p to the elements of the
vector v considered as a row-vector acted on by a permutation
......@@ -188,7 +208,9 @@
("gsl_permute_vector" :type "_inverse")
(((mpointer p) :pointer) ((mpointer v) :pointer))
:definition :generic
:inputs (p v)
:outputs (v)
:return (v)
:documentation ; FDL
"Apply the permutation p to the elements of the
vector v considered as a row-vector acted on by a permutation
......@@ -202,7 +224,9 @@
(((mpointer p) :pointer)
((mpointer pa) :pointer)
((mpointer pb) :pointer))
:inputs (pa pb)
:outputs (p)
:return (p)
:documentation ; FDL
"Combine the two permutations pa and pb into a
single permutation p where p = pa . pb. The permutation
......@@ -215,6 +239,7 @@
(defmfun linear-to-canonical (q p)
"gsl_permutation_linear_to_canonical"
(((mpointer q) :pointer) ((mpointer p) :pointer))
:inputs (p)
:outputs (q)
:documentation ; FDL
"Compute the canonical form of the permutation p and
......@@ -223,6 +248,7 @@
(defmfun canonical-to-linear (p q)
"gsl_permutation_canonical_to_linear"
(((mpointer p) :pointer) ((mpointer q) :pointer))
:inputs (q)
:outputs (p)
:documentation ; FDL
"Convert a permutation q in canonical form back into
......@@ -231,6 +257,7 @@
(defmfun inversions (p)
"gsl_permutation_inversions" (((mpointer p) :pointer))
:c-return sizet
:inputs (p)
:documentation ; FDL
"Count the number of inversions in the permutation
p. An inversion is any pair of elements that are not in order.
......@@ -241,6 +268,7 @@
(defmfun linear-cycles (p)
"gsl_permutation_linear_cycles" (((mpointer p) :pointer))
:c-return sizet
:inputs (p)
:documentation ; FDL
"Count the number of cycles in the permutation p, given in linear form.")
......@@ -248,6 +276,7 @@
"gsl_permutation_canonical_cycles"
(((mpointer p) :pointer))
:c-return sizet
:inputs (p)
:documentation ; FDL
"Count the number of cycles in the permutation q, given in canonical form.")
......
;; Macro for defining GSL functions.
;; Liam Healy 2008-04-16 20:49:50EDT defmfun.lisp
;; Time-stamp: <2008-11-29 15:30:45EST defmfun.lisp>
;; Time-stamp: <2008-12-07 18:18:03EST defmfun.lisp>
;; $Id$
(in-package :gsl)
......@@ -638,6 +638,7 @@
(t (unless
(or
(and (eq c-return :error-code)
(not outputs)
(not allocated)
(not return-supplied-p))
(and (null return) return-supplied-p))
......
;; BLAS level 1, Vector operations
;; Liam Healy, Wed Apr 26 2006 - 15:23
;; Time-stamp: <2008-11-09 17:11:25EST blas1.lisp>
;; Time-stamp: <2008-12-07 18:24:40EST blas1.lisp>
;; $Id$
(in-package :gsl)
......@@ -11,6 +11,7 @@
(result :element-c-type))
:definition :generic
:element-types :float-complex
:inputs (vec1 vec2)
:documentation ; FDL
"Dot, or inner, product between vectors.")
......@@ -19,6 +20,7 @@
"gsl_blas_sdsdot"
((alpha :float) ((mpointer vec1) :pointer) ((mpointer vec2) :pointer)
(result :pointer))
:inputs (vec1 vec2)
:outputs (result)
:documentation ; FDL
"Sum of a scalar and a dot product for single-floats.")
......@@ -87,7 +89,6 @@
:element-types :float-complex
:inputs (x)
:outputs (y)
:return (y)
:documentation ; FDL
"Copy the elements of the vector x into the vector y.")
......@@ -100,7 +101,6 @@
:element-types :float-complex
:inputs (x y)
:outputs (y)
:return (y)
:documentation ; FDL
"Compute the sum y = \alpha x + y for the vectors x and y.")
......@@ -114,7 +114,6 @@
:c-return :void
:inputs (x)
:outputs (x)
:return (x)
:documentation ; FDL
"Rescale the vector x by the multiplicative factor alpha.")
......@@ -126,8 +125,7 @@
:element-types :complex
:c-return :void
:inputs (x)
:outputs (x)
:return (x))
:outputs (x))
;;; The Givens rotations come in two forms, those that work on bare C
;;; arrays, and those that work on GSL vectors. Ports of both are
......@@ -141,7 +139,6 @@
:element-types :float
:inputs (x y c s)
:outputs (x y)
:return (x y)
:documentation ; FDL
"These functions compute a Givens rotation (c,s) to the vector (x,y),
[ c s ] [ x ] = [ r ]
......
;; BLAS level 2, Matrix-vector operations
;; Liam Healy, Wed Apr 26 2006 - 21:08
;; Time-stamp: <2008-11-09 18:15:43EST blas2.lisp>
;; Time-stamp: <2008-12-07 18:25:57EST blas2.lisp>
;; $Id$
(in-package :gsl)
......@@ -36,7 +36,6 @@
:element-types :float-complex
:inputs (A x y)
:outputs (y)
:return (y)
:documentation ; FDL
"If the second and third arguments are vectors, compute
the matrix-vector product and sum
......@@ -59,7 +58,6 @@
:element-types :float-complex
:inputs (A x)
:outputs (x)
:return (x)
:documentation ; FDL
"If the second argument is a vector, compute
the matrix-vector product x =alpha op(A) x
......@@ -92,7 +90,6 @@
:element-types :float-complex
:inputs (A x)
:outputs (x)
:return (x)
:documentation ; FDL
"If the second argument is a vector, compute
inv(op(A)) x for x, where op(A) = A, A^T, A^H for
......@@ -123,7 +120,6 @@
:element-types :float
:inputs (A x y)
:outputs (y)
:return (y)
:documentation ; FDL
"If the second and third arguments are vectors, compute
the matrix-vector product and sum y = alpha A
......@@ -152,7 +148,6 @@
:element-types :complex
:inputs (A x y)
:outputs (y)
:return (y)
:documentation ; FDL
"If the second and third arguments are vectors, compute the
matrix-vector product and sum y = alpha A x + beta y for the
......@@ -178,7 +173,6 @@
:element-types :float-complex
:inputs (x y A)
:outputs (A)
:return (A)
:documentation ; FDL
"The rank-1 update A = alpha x y^T + A of the matrix A.")
......@@ -190,7 +184,6 @@
:element-types :complex
:inputs (x y A)
:outputs (A)
:return (A)
:documentation ; FDL
"The conjugate rank-1 update A = alpha x y^H + A of the matrix A.")
......@@ -204,7 +197,6 @@
:element-types :float
:inputs (x A)
:outputs (A)
:return (A)
:documentation ; FDL
"If the first argument is a vector,
the symmetric rank-1 update A = \alpha x x^T + A of the symmetric
......@@ -230,7 +222,6 @@
:element-types :complex
:inputs (x A)
:outputs (A)
:return (A)
:documentation ; FDL
"If the first argument is a vector,
compute the hermitian rank-1 update A = alpha x x^H + A of the
......@@ -259,7 +250,6 @@
:element-types :float
:inputs (x y A)
:outputs (A)
:return (A)
:documentation ; FDL
"If the first two arguments are vectors, compute
the symmetric rank-2 update A = alpha x y^T + alpha y x^T + A of the
......@@ -285,7 +275,6 @@
:element-types :complex
:inputs (x A)
:outputs (A)
:return (A)
:documentation ; FDL
"If the first two arguments are vectors, compute the
hermitian rank-2 update A = alpha x y^H + alpha^* y x^H A of
......
;; BLAS level 3, Matrix-matrix operations
;; Liam Healy, Wed Apr 26 2006 - 21:08
;; Time-stamp: <2008-11-09 18:12:05EST blas3.lisp>
;; Time-stamp: <2008-12-07 18:27:01EST blas3.lisp>
;; $Id$
(in-package :gsl)
......@@ -27,8 +27,7 @@
:definition :methods
:element-types :float-complex
:inputs (A B C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun matrix-product-symmetric
((A matrix) (B matrix) (C matrix)
......@@ -40,8 +39,7 @@
:definition :methods
:element-types :float-complex
:inputs (A B C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun matrix-product-hermitian
((A matrix) (B matrix) (C matrix)
......@@ -55,8 +53,7 @@
:definition :methods
:element-types :complex
:inputs (A B C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun matrix-product-triangular
((A matrix) (B matrix)
......@@ -69,8 +66,7 @@
:definition :methods
:element-types :float-complex
:inputs (A B)
:outputs (B)
:return (B))
:outputs (B))
(defmfun inverse-matrix-product
((A matrix) (B matrix)
......@@ -85,8 +81,7 @@
:definition :methods
:element-types :float-complex
:inputs (A B)
:outputs (B)
:return (B))
:outputs (B))
(defmfun symmetric-rank-1-update
((A matrix) (C matrix)
......@@ -98,8 +93,7 @@
:definition :methods
:element-types :float-complex
:inputs (A C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun hermitian-rank-1-update
((A matrix) (C matrix)
......@@ -111,8 +105,7 @@
:definition :methods
:element-types :complex
:inputs (A C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun symmetric-rank-2-update
((A matrix) (B matrix) (C matrix)
......@@ -125,8 +118,7 @@
:definition :methods
:element-types :float
:inputs (A B C)
:outputs (C)
:return (C))
:outputs (C))
(defmfun hermitian-rank-2-update
((A matrix) (B matrix) (C matrix)
......@@ -139,8 +131,7 @@
:definition :methods
:element-types :complex
:inputs (A B C)
:outputs (C)
:return (C))
:outputs (C))
;;;;****************************************************************************
;;;; Examples and unit test
......
;; Cholesky Decomposition
;; Liam Healy, Wed May 3 2006 - 16:38
;; Time-stamp: <2008-11-29 15:33:14EST cholesky.lisp>
;; Time-stamp: <2008-12-07 18:27:20EST cholesky.lisp>
;; $Id$
(in-package :gsl)
......@@ -21,7 +21,6 @@
"gsl_linalg_cholesky_decomp" (((mpointer A) :pointer))
:inputs (A)
:outputs (A)
:return (A)
:documentation ; FDL
"Factorize the positive-definite square matrix A
into the Cholesky decomposition A = L L^T. On output the diagonal
......@@ -37,7 +36,6 @@
((mpointer x) :pointer))
:inputs (A b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the system A x = b using the Cholesky
decomposition of A into the matrix cholesky given by
......@@ -48,7 +46,6 @@
(((mpointer A) :pointer) ((mpointer x) :pointer))
:inputs (A x)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the system A x = b in-place using the
Cholesky decomposition of A into the matrix cholesky given
......
;; Tridiagonal and Bidiagonal matrices
;; Liam Healy, Thu May 4 2006 - 15:43
;; Time-stamp: <2008-08-12 22:02:14EDT diagonal.lisp>
;; Time-stamp: <2008-12-07 18:31:38EST diagonal.lisp>
;; $Id$
(in-package :gsl)
......@@ -28,7 +28,6 @@
:element-types :doubles
:inputs (A)
:outputs (A tau)
:return (A tau)
:documentation ; FDL
"Factorizes the symmetric square matrix or hermitian matrix A into the
symmetric tridiagonal decomposition Q T Q^T. On output the
......@@ -49,7 +48,6 @@
:element-types :doubles
:inputs (A tau)
:outputs (Q diag subdiag)
:return (Q diag subdiag)
:documentation ; FDL
"Unpacks the encoded symmetric tridiagonal decomposition
(A, tau) obtained from #'tridiagonal-decomposition into the
......@@ -65,7 +63,6 @@
:element-types :doubles
:inputs (A)
:outputs (diag subdiag)
:return (diag subdiag)
:documentation ; FDL
"Unpack the diagonal and subdiagonal of the encoded symmetric
tridiagonal decomposition (A, tau) obtained from
......@@ -90,7 +87,6 @@
((mpointer tau-V) :pointer))
:inputs (A)
:outputs (A tau-U tau-V)
:return (A tau-U tau-V)
:documentation ; FDL
"Factorize the M-by-N matrix A into
bidiagonal form U B V^T. The diagonal and superdiagonal of the
......@@ -110,7 +106,6 @@
((mpointer diag) :pointer) ((mpointer superdiag) :pointer))
:inputs (A tau-U tau-V)
:outputs (U V diag superdiag)
:return (U V diag superdiag)
:documentation ; FDL
"Unpack the bidiagonal decomposition of A given by
#'bidiagonal-decomposition (A, tau-U, tau-V)
......@@ -126,7 +121,6 @@
((mpointer tau-V) :pointer) ((mpointer V) :pointer))
:inputs (A tau-U tau-V)
:outputs (A V)
:return (A V)
:documentation ; FDL
"Unpack the bidiagonal decomposition of A given by
#'bidiagonal-decomposition (A, tau-U, tau-V)
......@@ -140,7 +134,6 @@
((mpointer superdiag) :pointer))
:inputs (A)
:outputs (diag superdiag)
:return (diag superdiag)
:documentation ; FDL
"Unpack the diagonal and superdiagonal of the bidiagonal
decomposition of A given by #'bidiagonal-decomposition, into the
......@@ -157,7 +150,6 @@
((mpointer x) :pointer))
:inputs (diag superdiag subdiag b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the general N-by-N system A x = b where A is tridiagonal
(N >= 2). The super-diagonal and
......@@ -175,7 +167,6 @@
((mpointer b) :pointer) ((mpointer x) :pointer))
:inputs (diag off-diagonal b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the general N-by-N system A x = b where A is
symmetric tridiagonal (N >= 2). The off-diagonal vector
......@@ -193,7 +184,6 @@
((mpointer b) :pointer) ((mpointer x) :pointer))
:inputs (diag super-diag sub-diag)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the general N-by-N system A x = b where A is cyclic
tridiagonal (N >= 3). The cyclic super-diagonal and
......@@ -211,7 +201,6 @@
((mpointer b) :pointer) ((mpointer x) :pointer))
:inputs (diag off-diagonal b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the general N-by-N system A x = b where A is symmetric
cyclic tridiagonal (N >= 3). The cyclic
......
;; Exponential of a matrix
;; Liam Healy 2008-08-10 17:25:35EDT exponential.lisp
;; Time-stamp: <2008-11-30 23:35:44EST exponential.lisp>
;; Time-stamp: <2008-12-07 18:31:37EST exponential.lisp>
;; $Id: $
(in-package :gsl)
......@@ -12,7 +12,6 @@
(mode sf-mode))
:inputs (matrix)
:outputs (exponential)
:return (exponential)
:documentation
"Calculate the matrix exponential by the scaling and
squaring method described in Moler + Van Loan,
......
;; Householder Transformations
;; Liam Healy, Wed May 10 2006 - 10:03
;; Time-stamp: <2008-08-11 22:31:45EDT householder.lisp>
;; Time-stamp: <2008-12-07 18:31:26EST householder.lisp>
;; $Id$
;;; For householder-transform, it would be nice to be able to pick the
......@@ -25,6 +25,7 @@
(defmfun householder-transform (v)
"gsl_linalg_householder_transform"
(((mpointer v) :pointer))
:inputs (v)
:outputs (v)
:c-return (ret :double)
:return (v ret)
......@@ -37,6 +38,7 @@
(defmfun householder-HM (tau v A)
"gsl_linalg_householder_hm"
((tau :double) ((mpointer v) :pointer) ((mpointer A) :pointer))
:inputs (v A)
:outputs (A)
:documentation ; FDL
"Apply the Householder matrix P defined by the
......@@ -46,6 +48,7 @@
(defmfun householder-MH (tau v A)
"gsl_linalg_householder_mh"
((tau :double) ((mpointer v) :pointer) ((mpointer A) :pointer))
:inputs (v A)
:outputs (A)
:documentation ; FDL
"Apply the Householder matrix P defined by the
......@@ -55,11 +58,12 @@
(defmfun householder-Hv (tau v w)
"gsl_linalg_householder_hv"
((tau :double) ((mpointer v) :pointer) ((mpointer w) :pointer))
:inputs (v w)
:outputs (w)
:documentation ; FDL
"Apply the Householder transformation P defined by
the scalar tau and the vector v to the vector w. On
output the result P w is stored in w."
:outputs (w))
output the result P w is stored in w.")
;;;;****************************************************************************
;;;; Householder solver for linear systems
......@@ -69,6 +73,7 @@
"gsl_linalg_HH_solve"
(((mpointer A) :pointer) ((mpointer b) :pointer)
((mpointer x) :pointer))
:inputs (A b x)
:outputs (x A)
:return (x)
:documentation ; FDL
......@@ -80,6 +85,7 @@
(defmfun householder-svx (A x)
"gsl_linalg_HH_svx"
(((mpointer A) :pointer) ((mpointer x) :pointer))
:inputs (A x)
:outputs (x A)
:return (x)
:documentation ; FDL
......
;; LU decomposition
;; Liam Healy, Thu Apr 27 2006 - 12:42
;; Time-stamp: <2008-11-30 23:44:35EST lu.lisp>
;; Time-stamp: <2008-12-07 18:32:04EST lu.lisp>
;; $Id$
(in-package :gsl)
......@@ -39,7 +39,6 @@
:definition :generic
:inputs (LU p b)
:outputs (x)
:return (x)
:element-types :doubles
:documentation ; FDL
"Solve the square system A x = b using the LU
......@@ -52,7 +51,6 @@
:definition :generic
:inputs (LU p)
:outputs (x)
:return (x)
:element-types :doubles
:documentation ; FLD
"Solve the square system A x = b in-place
......@@ -83,7 +81,6 @@
:definition :generic
:inputs (LU p)
:outputs (inverse)
:return (inverse)
:element-types :doubles
:documentation ; FDL
"Compute the inverse of a matrix A from its LU
......@@ -138,7 +135,7 @@
"Invert the matrix."
(letm ((mmat mat)
(dim (array-dimension mat 0))
(per (permutation dim))
(per (make-permutation dim))
(inv (make-array* 'double-float :dimensions (list dim dim))))
(LU-decomposition mmat per)
(lu-invert mmat per inv)
......
;; QR decomposition
;; Liam Healy 2008-02-17 11:05:20EST qr.lisp
;; Time-stamp: <2008-08-11 22:22:09EDT qr.lisp>
;; Time-stamp: <2008-12-07 18:32:41EST qr.lisp>
;; $Id$
(in-package :gsl)
......@@ -23,7 +23,6 @@
(((mpointer A) :pointer) ((mpointer tau) :pointer))
:inputs (A)
:outputs (A tau)
:return (A tau)
:documentation ; FDL
"Factorize the M-by-N matrix A into the QR decomposition A = Q R.
On output the diagonal and
......@@ -46,7 +45,6 @@
((mpointer b) :pointer) ((mpointer x) :pointer))
:inputs (QR tau b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the square system A x = b using the QR
decomposition of A into (QR, tau) given by
......@@ -59,7 +57,6 @@
((mpointer x) :pointer))
:inputs (QR tau x)
:outputs (x)
:return (x)
:documentation ; FDL
"Solves the square system A x = b in-place using the
QR decomposition of A into (QR, tau) given by
......@@ -73,7 +70,6 @@
((mpointer residual) :pointer))
:inputs (QR tau b)
:outputs (x residual)
:return (x residual)
:documentation ; FDL
"The least squares solution to the overdetermined system A x = b
where the matrix A has more rows than columns. The least squares
......@@ -88,7 +84,6 @@
((mpointer v) :pointer))
:inputs (QR tau)
:outputs (v)
:return (v)
:documentation ; FDL
"Apply the matrix Q^T encoded in the decomposition
(QR, tau) to the vector v, storing the result Q^T v in v.
......@@ -102,7 +97,6 @@
((mpointer v) :pointer))
:inputs (QR tau)
:outputs (v)
:return (v)
:documentation ; FDL
"Apply the matrix Q encoded in the decomposition
(QR, tau) to the vector v, storing the result Q v in v.
......@@ -116,7 +110,6 @@
((mpointer x) :pointer))
:inputs (QR b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the triangular system R x = b for x. It may be useful if the
product b' = Q^T b has already been computed using QR-QTvec}.")
......@@ -126,7 +119,6 @@
(((mpointer QR) :pointer) ((mpointer x) :pointer))
:inputs (QR x)
:outputs (x)
:return (x)
:documentation ; FDL
"Solve the triangular system R x = b for x in-place. On input x
should contain the right-hand side b and is replaced by the solution
......@@ -139,7 +131,6 @@
((mpointer Q) :pointer) ((mpointer R) :pointer))
:inputs (QR tau)
:outputs (Q R)
:return (Q R)
:documentation ; FDL
"Unpack the encoded QR decomposition
(QR, tau) into the matrices Q and R where
......@@ -151,7 +142,6 @@
((mpointer b) :pointer) ((mpointer x) :pointer))
:inputs (Q R b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solves the system R x = Q^T b for x. It can
be used when the QR decomposition of a matrix is available in
......@@ -177,7 +167,6 @@
((mpointer x) :pointer))
:inputs (R b)
:outputs (x)
:return (x)
:documentation ; FDL
"Solves the triangular system R x = b for the N-by-N matrix R.")
......@@ -186,7 +175,6 @@
(((mpointer R) :pointer) ((mpointer <