Module Lacaml.D

module D: Lacaml_D
Double precision real BLAS and LAPACK functions.

type prec = Bigarray.float64_elt 
type num_type = float 
type vec = (float, Bigarray.float64_elt, Bigarray.fortran_layout) Bigarray.Array1.t 
Vectors (precision: float64).
type rvec = vec 
type mat = (float, Bigarray.float64_elt, Bigarray.fortran_layout) Bigarray.Array2.t 
Matrices (precision: float64).
type trans3 = [ `N | `T ] 
Transpose parameter (normal or transposed). For complex matrices, conjugate transpose is also offered, hence the name.
val prec : (float, Bigarray.float64_elt) Bigarray.kind
Precision for this submodule D. Allows to write precision independent code.
module Vec: sig .. end
module Mat: sig .. end
val pp_num : Format.formatter -> float -> unit
pp_num ppf el is equivalent to fprintf ppf "%G" el.
val pp_vec : (float, 'a) Lacaml_io.pp_vec
Pretty-printer for column vectors.
val pp_mat : (float, 'a) Lacaml_io.pp_mat
Pretty-printer for matrices.

BLAS-1 interface

val dot : ?n:int ->
?ofsx:int ->
?incx:int ->
Lacaml_float64.vec -> ?ofsy:int -> ?incy:int -> Lacaml_float64.vec -> float
dot ?n ?ofsx ?incx x ?ofsy ?incy y see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
ofsy : default = 1
incy : default = 1
val asum : ?n:int -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> float
asum ?n ?ofsx ?incx x see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1

BLAS-2 interface

val sbmv : ?n:int ->
?k:int ->
?ofsy:int ->
?incy:int ->
?y:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?up:bool ->
?alpha:float ->
?beta:float ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.vec
sbmv ?n ?k ?ofsy ?incy ?y ?ar ?ac a ?up ?alpha ?beta ?ofsx ?incx x see BLAS documentation!
Returns vector y, which is overwritten.
n : default = number of available columns to the right of ac.
k : default = number of available rows in matrix a - 1
ofsy : default = 1
incy : default = 1
y : default = uninitialized vector of minimal length (see BLAS)
ar : default = 1
ac : default = 1
up : default = true i.e., upper band of a is supplied
alpha : default = 1.0
beta : default = 0.0
ofsx : default = 1
incx : default = 1
val ger : ?m:int ->
?n:int ->
?alpha:float ->
?ofsx:int ->
?incx:int ->
Lacaml_float64.vec ->
?ofsy:int ->
?incy:int ->
Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.mat
ger ?m ?n ?alpha ?ofsx ?incx x ?ofsy ?incy y n ?ar ?ac a see BLAS documentation!
Returns vector a, which is overwritten
m : default = number of rows of a
n : default = number of columns of a
alpha : default = 1.0
ofsx : default = 1
incx : default = 1
ofsy : default = 1
incy : default = 1
ar : default = 1
ac : default = 1
val syr : ?n:int ->
?alpha:float ->
?up:bool ->
?ofsx:int ->
?incx:int ->
Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.mat
syr ?n ?alpha ?up ?ofsx ?incx x ?ar ?ac a see BLAS documentation!
Returns matrix a, which is overwritten
n : default = number of rows of a
alpha : default = 1.0
up : default = true i.e., upper triangle of a is supplied
ofsx : default = 1
incx : default = 1
ar : default = 1
ac : default = 1

LAPACK interface


LAPACK interface


Auxiliary routines

val lansy_min_lwork : int -> Lacaml_common.norm4 -> int
lansy_min_lwork m norm
Returns the minimum length of the work array used by the lansy-function.
val lansy : ?n:int ->
?up:bool ->
?norm:Lacaml_common.norm4 ->
?work:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> float
lansy ?norm ?up ?n ?ar ?ac ?work a see LAPACK documentation!
n : default = number of columns of matrix a
up : default = true (reference upper triangular part of a)
norm : default = `O
work : default = allocated work space for norm `I
val lamch : [ `B | `E | `L | `M | `N | `O | `P | `R | `S | `U ] -> float
lamch cmach see LAPACK documentation!

Linear equations (computational routines)

val orgqr_min_lwork : n:int -> int
orgqr_min_lwork ~n
Returns the minimum length of the work-array used by the orgqr-function if the matrix has n columns.
val orgqr_opt_lwork : ?m:int ->
?n:int ->
?k:int ->
tau:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
orgqr_opt_lwork ?m ?n ?k ~tau ?ar ?ac a
Returns the optimum length of the work-array used by the orgqr-function given matrix a, optionally its logical dimensions m and n, and the number of reflectors k.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
k : default = available number of elements in vector tau
val orgqr : ?m:int ->
?n:int ->
?k:int ->
?work:Lacaml_float64.vec ->
tau:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> unit
orgqr ?m ?n ?k ?work ~tau ?ar ?ac a see LAPACK documentation!
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
k : default = available number of elements in vector tau
val ormqr_opt_lwork : ?side:Lacaml_common.side ->
?trans:Lacaml_common.trans2 ->
?m:int ->
?n:int ->
?k:int ->
tau:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat -> ?cr:int -> ?cc:int -> Lacaml_float64.mat -> int
ormqr_opt_lwork ?side ?trans ?m ?n ?k ~tau ?ar ?ac a ?cr ?cc c
Returns the optimum length of the work-array used by the ormqr-function given matrix a and b, optionally its logical dimensions m and n, and the number of reflectors k.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
k : default = available number of elements in vector tau
val ormqr : ?side:Lacaml_common.side ->
?trans:Lacaml_common.trans2 ->
?m:int ->
?n:int ->
?k:int ->
?work:Lacaml_float64.vec ->
tau:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat -> ?cr:int -> ?cc:int -> Lacaml_float64.mat -> unit
ormqr ?side ?trans ?m ?n ?k ?work ~tau ?ar ?ac a ?cr ?cc c see LAPACK documentation!
side : default = `L
trans : default = `N
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
k : default = available number of elements in vector tau
val gecon_min_lwork : int -> int
gecon_min_lwork n
Returns the minimum length of the work array used by the gecon-function.
val gecon_min_liwork : int -> int
gecon_min_liwork n
Returns the minimum length of the iwork array used by the gecon-function.
val gecon : ?n:int ->
?norm:Lacaml_common.norm2 ->
?anorm:float ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> float
gecon ?n ?norm ?anorm ?work ?rwork ?ar ?ac a
Returns estimate of the reciprocal of the condition number of matrix a
n : default = available number of columns of matrix a
norm : default = 1-norm
anorm : default = norm of the matrix a as returned by lange
work : default = automatically allocated workspace
iwork : default = automatically allocated workspace
ar : default = 1
ac : default = 1
val sycon_min_lwork : int -> int
sycon_min_lwork n
Returns the minimum length of the work array used by the sycon-function.
val sycon_min_liwork : int -> int
sycon_min_liwork n
Returns the minimum length of the iwork array used by the sycon-function.
val sycon : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?anorm:float ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> float
sycon ?n ?up ?ipiv ?anorm ?work ?iwork ?ar ?ac a
Returns estimate of the reciprocal of the condition number of symmetric matrix a
n : default = available number of columns of matrix a
up : default = upper triangle of the factorization of a is stored
ipiv : default = vec of length n
anorm : default = 1-norm of the matrix a as returned by lange
work : default = automatically allocated workspace
iwork : default = automatically allocated workspace
val pocon_min_lwork : int -> int
pocon_min_lwork n
Returns the minimum length of the work array used by the pocon-function.
val pocon_min_liwork : int -> int
pocon_min_liwork n
Returns the minimum length of the iwork array used by the pocon-function.
val pocon : ?n:int ->
?up:bool ->
?anorm:float ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> float
pocon ?n ?up ?anorm ?work ?iwork ?ar ?ac a
Returns estimate of the reciprocal of the condition number of symmetric positive definite matrix a
n : default = available number of columns of matrix a
up : default = upper triangle of Cholesky factorization of a is stored
anorm : default = 1-norm of the matrix a as returned by lange
work : default = automatically allocated workspace
iwork : default = automatically allocated workspace

Least squares (expert drivers)

val gelsy_min_lwork : m:int -> n:int -> nrhs:int -> int
gelsy_min_lwork ~m ~n ~nrhs
Returns the minimum length of the work-array used by the gelsy-function if the logical dimensions of the matrix are m rows and n columns and if there are nrhs right hand side vectors.
val gelsy_opt_lwork : ?m:int ->
?n:int ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelsy_opt_lwork ?m ?n ?ar ?ac a ?nrhs ?br ?bc b
Returns the optimum length of the work-array used by the gelsy-function given matrix a, optionally its logical dimensions m and n and given right hand side matrix b with an optional number nrhs of vectors.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
nrhs : default = available number of columns in matrix b
val gelsy : ?m:int ->
?n:int ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?rcond:float ->
?jpvt:Lacaml_common.int32_vec ->
?work:Lacaml_float64.vec ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelsy ?m ?n ?ar ?ac a ?rcond ?jpvt ?ofswork ?work ?nrhs b see LAPACK documentation!
Returns the effective rank of a.
m : default = available number of rows in matrix a
n : default = available number of columns of matrix a
rcond : default = (-1) => machine precision
jpvt : default = vec of length n
work : default = vec of optimum length (-> gelsy_opt_lwork)
nrhs : default = available number of columns in matrix b
val gelsd_min_lwork : m:int -> n:int -> nrhs:int -> int
gelsd_min_lwork ~m ~n ~nrhs
Returns the minimum length of the work-array used by the gelsd-function if the logical dimensions of the matrix are m and n and if there are nrhs right hand side vectors.
val gelsd_opt_lwork : ?m:int ->
?n:int ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelsd_opt_lwork ?m ?n ?ar ?ac a ?nrhs b
Returns the optimum length of the work-array used by the gelsd-function given matrix a, optionally its logical dimensions m and n and given right hand side matrix b with an optional number nrhs of vectors.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
nrhs : default = available number of columns in matrix b
val gelsd_min_iwork : int -> int -> int
gelsd_min_iwork m n
Returns the minimum (= optimum) length of the iwork-array used by the gelsd-function if the logical dimensions of the matrix are m and n.
val gelsd : ?m:int ->
?n:int ->
?rcond:float ->
?ofss:int ->
?s:Lacaml_float64.vec ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelsd ?m ?n ?rcond ?ofss ?s ?ofswork ?work ?ar ?ac a ?nrhs b see LAPACK documentation!
Raises Failure if the function fails to converge.
Returns the effective rank of a.
m : default = available number of rows in matrix a
n : default = available number of columns of matrix a
rcond : default = (-1) => machine precision
ofss : default = 1 or ignored if s is not given
s : default = vec of length min rows cols
work : default = vec of optimum length (-> gelsd_opt_lwork)
iwork : default = vec of optimum (= minimum) length
nrhs : default = available number of columns in matrix b
val gelss_min_lwork : m:int -> n:int -> nrhs:int -> int
gelss_min_lwork ~m ~n ~nrhs
Returns the minimum length of the work-array used by the gelss-function if the logical dimensions of the matrix are m rows and n columns and if there are nrhs right hand side vectors.
val gelss_opt_lwork : ?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?m:int ->
?n:int -> ?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelss_opt_lwork ?ar ?ac a ?m ?n ?nrhs ?br ?bc b
Returns the optimum length of the work-array used by the gelss-function given matrix a, optionally its logical dimensions m and n and given right hand side matrix b with an optional number nrhs of vectors.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
nrhs : default = available number of columns in matrix b
val gelss : ?m:int ->
?n:int ->
?rcond:float ->
?ofss:int ->
?s:Lacaml_float64.vec ->
?work:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gelss ?m ?n ?rcond ?ofss ?s ?ofswork ?work ?ar ?ac a ?nrhs ?br ?bc b see LAPACK documentation!
Raises Failure if the function fails to converge.
Returns the effective rank of a.
m : default = available number of rows in matrix a
n : default = available number of columns of matrix a
rcond : default = (-1) => machine precision
ofss : default = 1 or ignored if s is not given
s : default = vec of length min m n
work : default = vec of optimum length (-> gelss_opt_lwork)
nrhs : default = available number of columns in matrix b

General Schur factorization

val gees : ?n:int ->
?jobvs:Lacaml_common.schur_vectors ->
?sort:Lacaml_common.eigen_value_sort ->
?wr:Lacaml_float64.vec ->
?wi:Lacaml_float64.vec ->
?vsr:int ->
?vsc:int ->
?vs:Lacaml_float64.mat ->
?work:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
int * Lacaml_float64.vec * Lacaml_float64.vec * Lacaml_float64.mat
gees ?n ?jobvs ?sort ?w ?vsr ?vsc ?vs ?work ?ar ?ac a See gees-function for details about arguments.
Returns (sdim, wr, wi, vs)

General SVD routines

val gesvd_min_lwork : m:int -> n:int -> int
gesvd_min_lwork ~m ~n
Returns the minimum length of the work array used by the gesvd-function for matrices with m rows and n columns.
val gesvd_opt_lwork : ?m:int ->
?n:int ->
?jobu:Lacaml_common.svd_job ->
?jobvt:Lacaml_common.svd_job ->
?s:Lacaml_float64.vec ->
?ur:int ->
?uc:int ->
?u:Lacaml_float64.mat ->
?vtr:int ->
?vtc:int ->
?vt:Lacaml_float64.mat -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
val gesvd : ?m:int ->
?n:int ->
?jobu:Lacaml_common.svd_job ->
?jobvt:Lacaml_common.svd_job ->
?s:Lacaml_float64.vec ->
?ur:int ->
?uc:int ->
?u:Lacaml_float64.mat ->
?vtr:int ->
?vtc:int ->
?vt:Lacaml_float64.mat ->
?work:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
Lacaml_float64.vec * Lacaml_float64.mat * Lacaml_float64.mat
val gesdd_liwork : m:int -> n:int -> int
val gesdd_min_lwork : ?jobz:Lacaml_common.svd_job -> m:int -> n:int -> unit -> int
gesdd_min_lwork ?jobz ~m ~n
Returns the minimum length of the work array used by the gesdd-function for matrices with m rows and n columns for SVD-job jobz.
val gesdd_opt_lwork : ?m:int ->
?n:int ->
?jobz:Lacaml_common.svd_job ->
?s:Lacaml_float64.vec ->
?ur:int ->
?uc:int ->
?u:Lacaml_float64.mat ->
?vtr:int ->
?vtc:int ->
?vt:Lacaml_float64.mat ->
?iwork:Lacaml_common.int32_vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
val gesdd : ?m:int ->
?n:int ->
?jobz:Lacaml_common.svd_job ->
?s:Lacaml_float64.vec ->
?ur:int ->
?uc:int ->
?u:Lacaml_float64.mat ->
?vtr:int ->
?vtc:int ->
?vt:Lacaml_float64.mat ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
Lacaml_float64.vec * Lacaml_float64.mat * Lacaml_float64.mat

General eigenvalue problem (simple drivers)

val geev_min_lwork : ?vectors:bool -> int -> int
geev_min_lwork vectors n
Returns the minimum length of the work array used by the geev-function. vectors indicates whether eigenvectors are supposed to be computed.
vectors : default = true
val geev_opt_lwork : ?n:int ->
?vlr:int ->
?vlc:int ->
?vl:Lacaml_float64.mat option ->
?vrr:int ->
?vrc:int ->
?vr:Lacaml_float64.mat option ->
?ofswr:int ->
?wr:Lacaml_float64.vec ->
?ofswi:int ->
?wi:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
geev_opt_lwork ?n ?vlr ?vlc ?vl ?vrr ?vrc ?vr ?ofswr wr ?ofswi wi ?ar ?ac a See geev-function for details about arguments.
Returns "optimal" size of work array.
val geev : ?n:int ->
?work:Lacaml_float64.vec ->
?vlr:int ->
?vlc:int ->
?vl:Lacaml_float64.mat option ->
?vrr:int ->
?vrc:int ->
?vr:Lacaml_float64.mat option ->
?ofswr:int ->
?wr:Lacaml_float64.vec ->
?ofswi:int ->
?wi:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
Lacaml_float64.mat * Lacaml_float64.vec * Lacaml_float64.vec *
Lacaml_float64.mat
geev ?work ?n ?vlr ?vlc ?vl ?vrr ?vrc ?vr ?ofswr wr ?ofswi wi ?ar ?ac a
Raises Failure if the function fails to converge
Returns (lv, wr, wi, rv), where wr and wv are the real and imaginary components of the eigenvalues, and lv and rv are the left and right eigenvectors. lv (rv) is the empty matrix if vl (vr) is set to None.
n : default = available number of columns of matrix a
work : default = automatically allocated workspace
vl : default = Automatically allocated left eigenvectors. Pass None if you do not want to compute them, Some lv if you want to provide the storage. You can set vlr, vlc in the last case. (See LAPACK GEEV docs for details about storage of complex eigenvectors)
vr : default = Automatically allocated right eigenvectors. Pass None if you do not want to compute them, Some rv if you want to provide the storage. You can set vrr, vrc in the last case.
wr : default = vector of size n; real components of the eigenvalues
wi : default = vector of size n; imaginary components of the eigenvalues

Symmetric-matrix eigenvalue and singular value problems (simple drivers)

val syev_min_lwork : int -> int
syev_min_lwork n
Returns the minimum length of the work-array used by the Lacaml_D.syev-function if the logical dimensions of the matrix are n.
val syev_opt_lwork : ?n:int ->
?vectors:bool -> ?up:bool -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
syev_opt_lwork ?n ?vectors ?up ?ar ?ac a
Returns the optimum length of the work-array used by the Lacaml_D.syev-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syev : ?n:int ->
?vectors:bool ->
?up:bool ->
?work:Lacaml_float64.vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.vec
syev ?n ?vectors ?up ?ofswork ?work ?ofsw ?w ?ar ?ac a computes all eigenvalues and, optionally, eigenvectors of the real symmetric matrix a.
Raises Failure if the function fails to converge.
Returns the vector w of eigenvalues in ascending order.
n : default = available number of columns of matrix a
vectors : default = false i.e, eigenvectors are not computed
up : default = true i.e., upper triangle of a is stored
work : default = vec of optimum length (-> Lacaml_D.syev_opt_lwork)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n
val syevd_min_lwork : vectors:bool -> int -> int
syevd_min_lwork vectors n
Returns the minimum length of the work-array used by the Lacaml_D.syevd-function if the logical dimensions of the matrix are n and given whether eigenvectors should be computed (vectors).
val syevd_min_liwork : vectors:bool -> int -> int
syevd_min_liwork vectors n
Returns the minimum length of the iwork-array used by the Lacaml_D.syevd-function if the logical dimensions of the matrix are n and given whether eigenvectors should be computed (vectors).
val syevd_opt_lwork : ?n:int ->
?vectors:bool -> ?up:bool -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
syevd_opt_lwork ?n ?vectors ?up ?ar ?ac a
Returns the optimum length of the work-array used by the Lacaml_D.syevd-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevd_opt_liwork : ?n:int ->
?vectors:bool -> ?up:bool -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
syevd_opt_liwork ?n ?vectors ?up ?ar ?ac a
Returns the optimum length of the iwork-array used by the Lacaml_D.syevd-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevd_opt_l_li_work : ?n:int ->
?vectors:bool ->
?up:bool -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int * int
syevd_opt_l_li_iwork ?n ?vectors ?up ?ar ?ac a
Returns the tuple of optimum lengths of the work- and iwork-arrays respectively, used by the Lacaml_D.syevd-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevd : ?n:int ->
?vectors:bool ->
?up:bool ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.vec
syevd ?n ?vectors ?up ?ofswork ?work ?iwork ?ofsw ?w ?ar ?ac a computes all eigenvalues and, optionally, eigenvectors of the real symmetric matrix a. If eigenvectors are desired, it uses a divide and conquer algorithm.
Raises Failure if the function fails to converge.
Returns the vector w of eigenvalues in ascending order.
n : default = available number of columns of matrix a
vectors : default = false i.e, eigenvectors are not computed
up : default = true i.e., upper triangle of a is stored
work : default = vec of optimum length (-> Lacaml_D.syev_opt_lwork)
iwork : default = int32_vec of optimum length (-> Lacaml_D.syevd_opt_liwork)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n
val sbev_min_lwork : int -> int
sbev_min_lwork n
Returns the minimum length of the work-array used by the Lacaml_D.sbev-function if the logical dimensions of the matrix are n.
val sbev : ?n:int ->
?kd:int ->
?zr:int ->
?zc:int ->
?z:Lacaml_float64.mat ->
?up:bool ->
?work:Lacaml_float64.vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?abr:int -> ?abc:int -> Lacaml_float64.mat -> Lacaml_float64.vec
sbev ?n ?vectors ?zr ?zc ?z ?up ?ofswork ?work ?ofsw ?w ?abr ?abc ab computes all the eigenvalues and, optionally, eigenvectors of the real symmetric band matrix ab.
Raises Returns the vector w of eigenvalues in ascending order.
n : default = available number of columns of matrix ab
kd : default = number of rows in matrix ab - 1
z : matrix to contain the orthonormal eigenvectors of ab, the i-th column of z holding the eigenvector associated with w.{i}. default = None i.e, eigenvectors are not computed
up : default = true i.e., upper triangle of the matrix is stored
work : default = vec of minimal length (-> Lacaml_D.sbev_min_lwork)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n
abr : default = 1
abc : default = 1

Symmetric-matrix eigenvalue and singular value problems (expert & RRR drivers)

val syevr_min_lwork : int -> int
syevr_min_lwork n
Returns the minimum length of the work-array used by the Lacaml_D.syevr-function if the logical dimensions of the matrix are n.
val syevr_min_liwork : int -> int
syevr_min_liwork n
Returns the minimum length of the iwork-array used by the Lacaml_D.syevr-function if the logical dimensions of the matrix are n.
val syevr_opt_lwork : ?n:int ->
?vectors:bool ->
?range:[ `A | `I of int * int | `V of float * float ] ->
?up:bool -> ?abstol:float -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
syevr_opt_lwork ?n ?vectors ?range ?up ?abstol ?ar ?ac a
Returns the optimum length of the work-array used by the Lacaml_D.syevr-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevr_opt_liwork : ?n:int ->
?vectors:bool ->
?range:[ `A | `I of int * int | `V of float * float ] ->
?up:bool -> ?abstol:float -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
syevr_opt_liwork ?n ?vectors ?range ?up ?abstol ?ar ?ac a
Returns the optimum length of the iwork-array used by the Lacaml_D.syevr-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevr_opt_l_li_work : ?n:int ->
?vectors:bool ->
?range:[ `A | `I of int * int | `V of float * float ] ->
?up:bool ->
?abstol:float -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int * int
syevr_opt_l_li_iwork ?n ?vectors ?range ?up ?abstol ?ar ?ac a
Returns the tuple of optimum lengths of the work- and iwork-arrays respectively, used by the Lacaml_D.syevr-function given matrix a, optionally its logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
val syevr : ?n:int ->
?vectors:bool ->
?range:[ `A | `I of int * int | `V of float * float ] ->
?up:bool ->
?abstol:float ->
?work:Lacaml_float64.vec ->
?iwork:Lacaml_common.int32_vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?zr:int ->
?zc:int ->
?z:Lacaml_float64.mat ->
?isuppz:Lacaml_common.int32_vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
int * Lacaml_float64.vec * Lacaml_float64.mat * Lacaml_common.int32_vec
syevr ?n ?vectors ?range ?up ?abstol ?work ?iwork ?ofsw ?w ?zr ?zc ?z ?isuppz ?ar ?ac a range is either `A for computing all eigenpairs, `V (vl, vu) defines the lower and upper range of computed eigenvalues, `I (il, iu) defines the indexes of the computed eigenpairs, which are sorted in ascending order.
Returns the tuple (m, w, z, isuppz), where m is the number of computed eigenpairs, vector w contains the computed eigenvalues in ascending order, z contains the computed eigenvectors in same order, and isuppz indicates the nonzero elements in z.
n : default = available number of columns of matrix a
vectors : default = false i.e, eigenvectors are not computed
range : default = `A
up : default = true i.e., upper triangle of a is stored
abstol : default = result of calling lamch `S
work : default = vec of optimum length (-> Lacaml_D.syev_opt_lwork)
iwork : default = int32_vec of optimum length (-> Lacaml_D.syevr_opt_liwork)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n
zr : default = 1
zc : default = 1
z : default = matrix with minimal required dimension
isuppz : default = int32_vec with minimal required dimension
ar : default = 1
ac : default = 1
val sygv_opt_lwork : ?n:int ->
?vectors:bool ->
?up:bool ->
?itype:[ `AB | `A_B | `BA ] ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
sygv_opt_lwork ?n ?vectors ?up ?ar ?ac a ?br ?bc b
Returns the optimum length of the work-array used by the Lacaml_D.sygv-function for the given matrices a and b, optionally their logical dimension n and whether the eigenvectors must be computed (vectors).
n : default = available number of columns of matrix a
vectors : default = false, i.e. eigenvectors are not computed
up : default = true, i.e. upper triangle of a is stored
itype : specifies the problem type to be solved:
val sygv : ?n:int ->
?vectors:bool ->
?up:bool ->
?work:Lacaml_float64.vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?itype:[ `AB | `A_B | `BA ] ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?br:int -> ?bc:int -> Lacaml_float64.mat -> Lacaml_float64.vec
sygv ?n ?vectors ?up ?ofswork ?work ?ofsw ?w ?ar ?ac a computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form a*x=(lambda)*b*x, a*b*x=(lambda)*x, or b*a*x=(lambda)*x. Here a and b are assumed to be symmetric and b is also positive definite.
Raises Failure if the function fails to converge.
Returns the vector w of eigenvalues in ascending order.
n : default = available number of columns of matrix a
vectors : default = false i.e, eigenvectors are not computed
up : default = true i.e., upper triangle of a is stored
work : default = vec of optimum length (-> Lacaml_D.sygv_opt_lwork)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n
itype : specifies the problem type to be solved:
val sbgv : ?n:int ->
?ka:int ->
?kb:int ->
?zr:int ->
?zc:int ->
?z:Lacaml_float64.mat ->
?up:bool ->
?work:Lacaml_float64.vec ->
?ofsw:int ->
?w:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?br:int -> ?bc:int -> Lacaml_float64.mat -> Lacaml_float64.vec
sbgv ?n ?ka ?kb ?zr ?zc ?z ?up ?work ?ofsw ?w ?ar ?ac a ?br ?bc b computes all the eigenvalues, and optionally, the eigenvectors of a real generalized symmetric-definite banded eigenproblem, of the form a*x=(lambda)*b*x. Here a and b are assumed to be symmetric and banded, and b is also positive definite.
Raises Failure if the function fails to converge.
Returns the vector w of eigenvalues in ascending order.
n : default = available number of columns of matrix a
ka : the number of superdiagonals (or subdiagonals if up = false) of the matrix a. Default = dim1 a - ar.
kb : same as ka but for the matrix b.
z : default = None i.e, eigenvectors are not computed
up : default = true i.e., upper triangle of a is stored
work : default = vec of optimum length (3 * n)
ofsw : default = 1 or ignored if w is not given
w : default = vec of length n

BLAS-1 interface

val swap : ?n:int ->
?ofsx:int ->
?incx:int ->
x:Lacaml_float64.vec -> ?ofsy:int -> ?incy:int -> Lacaml_float64.vec -> unit
swap ?n ?ofsx ?incx ~x ?ofsy ?incy y see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
ofsy : default = 1
incy : default = 1
val scal : ?n:int ->
Lacaml_float64.num_type ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> unit
scal ?n alpha ?ofsx ?incx x see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
val copy : ?n:int ->
?ofsy:int ->
?incy:int ->
?y:Lacaml_float64.vec ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.vec
copy ?n ?ofsy ?incy ?y ?ofsx ?incx x see BLAS documentation!
Returns vector y, which is overwritten.
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsy : default = 1
incy : default = 1
y : default = new vector with ofsy+(n-1)(abs incy) rows
ofsx : default = 1
incx : default = 1
val nrm2 : ?n:int -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> float
nrm2 ?n ?ofsx ?incx x see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
val axpy : ?alpha:Lacaml_float64.num_type ->
?n:int ->
?ofsx:int ->
?incx:int ->
Lacaml_float64.vec -> ?ofsy:int -> ?incy:int -> Lacaml_float64.vec -> unit
axpy ?alpha ?n ?ofsx ?incx x ?ofsy ?incy y see BLAS documentation!
alpha : default = { re = 1.; im = 0. }
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
ofsy : default = 1
incy : default = 1
val iamax : ?n:int -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> int
iamax ?n ?ofsx ?incx x see BLAS documentation!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1
val amax : ?n:int ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.num_type
amax ?n ?ofsx ?incx x
Returns the greater of the absolute values of the elements of the vector x.
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
ofsx : default = 1
incx : default = 1

BLAS-2 interface

val gemv : ?m:int ->
?n:int ->
?beta:Lacaml_float64.num_type ->
?ofsy:int ->
?incy:int ->
?y:Lacaml_float64.vec ->
?trans:Lacaml_float64.trans3 ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.vec
gemv ?m ?n ?beta ?ofsy ?incy ?y ?trans ?alpha ?ar ?ac a ?ofsx ?incx x see BLAS documentation! BEWARE that the 1988 BLAS-2 specification mandates that this function has no effect when n=0 while the mathematically expected behabior is y ← beta * y.
Returns vector y, which is overwritten.
m : default = number of available rows in matrix a
n : default = available columns in matrix a
beta : default = { re = 0.; im = 0. }
ofsy : default = 1
incy : default = 1
y : default = vector with minimal required length (see BLAS)
trans : default = `N
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
ofsx : default = 1
incx : default = 1
val gbmv : ?m:int ->
?n:int ->
?beta:Lacaml_float64.num_type ->
?ofsy:int ->
?incy:int ->
?y:Lacaml_float64.vec ->
?trans:Lacaml_float64.trans3 ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
int ->
int -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.vec
gbmv ?m ?n ?beta ?ofsy ?incy ?y ?trans ?alpha ?ar ?ac a kl ku ?ofsx ?incx x see BLAS documentation!
Returns vector y, which is overwritten.
m : default = same as n (i.e., a is a square matrix)
n : default = available number of columns in matrix a
beta : default = { re = 0.; im = 0. }
ofsy : default = 1
incy : default = 1
y : default = vector with minimal required length (see BLAS)
trans : default = `N
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
ofsx : default = 1
incx : default = 1
val symv : ?n:int ->
?beta:Lacaml_float64.num_type ->
?ofsy:int ->
?incy:int ->
?y:Lacaml_float64.vec ->
?up:bool ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> Lacaml_float64.vec
symv ?n ?beta ?ofsy ?incy ?y ?up ?alpha ?ar ?ac a ?ofsx ?incx x see BLAS documentation!
Returns vector y, which is overwritten.
n : default = dimension of symmetric matrix a
beta : default = { re = 0.; im = 0. }
ofsy : default = 1
incy : default = 1
y : default = vector with minimal required length (see BLAS)
up : default = true (upper triangular portion of a is accessed)
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
ofsx : default = 1
incx : default = 1
val trmv : ?n:int ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?up:bool ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> unit
trmv ?n ?trans ?diag ?up ?ar ?ac a ?ofsx ?incx x see BLAS documentation!
n : default = dimension of triangular matrix a
trans : default = `N
diag : default = false (not a unit triangular matrix)
up : default = true (upper triangular portion of a is accessed)
ar : default = 1
ac : default = 1
ofsx : default = 1
incx : default = 1
val trsv : ?n:int ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?up:bool ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> unit
trsv ?n ?trans ?diag ?up ?ar ?ac a ?ofsx ?incx x see BLAS documentation!
n : default = dimension of triangular matrix a
trans : default = `N
diag : default = false (not a unit triangular matrix)
up : default = true (upper triangular portion of a is accessed)
ar : default = 1
ac : default = 1
ofsx : default = 1
incx : default = 1
val tpmv : ?n:int ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?up:bool ->
?ofsap:int ->
Lacaml_float64.vec -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> unit
tpmv ?n ?trans ?diag ?up ?ofsap ap ?ofsx ?incx x see BLAS documentation!
n : default = dimension of packed triangular matrix ap
trans : default = `N
diag : default = false (not a unit triangular matrix)
up : default = true (upper triangular portion of ap is accessed)
ofsap : default = 1
ofsx : default = 1
incx : default = 1
val tpsv : ?n:int ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?up:bool ->
?ofsap:int ->
Lacaml_float64.vec -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> unit
tpsv ?n ?trans ?diag ?up ?ofsap ap ?ofsx ?incx x see BLAS documentation!
n : default = dimension of packed triangular matrix ap
trans : default = `N
diag : default = false (not a unit triangular matrix)
up : default = true (upper triangular portion of ap is accessed)
ofsap : default = 1
ofsx : default = 1
incx : default = 1

BLAS-3 interface

val gemm : ?m:int ->
?n:int ->
?k:int ->
?beta:Lacaml_float64.num_type ->
?cr:int ->
?cc:int ->
?c:Lacaml_float64.mat ->
?transa:Lacaml_float64.trans3 ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?transb:Lacaml_float64.trans3 ->
?br:int -> ?bc:int -> Lacaml_float64.mat -> Lacaml_float64.mat
gemm ?m ?n ?k ?beta ?cr ?cc ?c ?transa ?alpha ?ar ?ac a ?transb ?br ?bc b see BLAS documentation!
Returns matrix c, which is overwritten.
m : default = number of rows of a (or tr a) and c
n : default = number of columns of b (or tr b) and c
k : default = number of columns of a (or tr a) and number of rows of b (or tr b)
beta : default = { re = 0.; im = 0. }
cr : default = 1
cc : default = 1
c : default = matrix with minimal required dimension
transa : default = `N
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
transb : default = `N
br : default = 1
bc : default = 1
val symm : ?m:int ->
?n:int ->
?side:Lacaml_common.side ->
?up:bool ->
?beta:Lacaml_float64.num_type ->
?cr:int ->
?cc:int ->
?c:Lacaml_float64.mat ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?br:int -> ?bc:int -> Lacaml_float64.mat -> Lacaml_float64.mat
symm ?m ?n ?side ?up ?beta ?cr ?cc ?c ?alpha ?ar ?ac a ?br ?bc b see BLAS documentation!
Returns matrix c, which is overwritten.
m : default = number of rows of c
n : default = number of columns of c
side : default = `L (left - multiplication is ab)
up : default = true (upper triangular portion of a is accessed)
beta : default = { re = 0.; im = 0. }
cr : default = 1
cc : default = 1
c : default = matrix with minimal required dimension
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
br : default = 1
bc : default = 1
val trmm : ?m:int ->
?n:int ->
?side:Lacaml_common.side ->
?up:bool ->
?transa:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
a:Lacaml_float64.mat -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
trmm ?m ?n ?side ?up ?transa ?diag ?alpha ?ar ?ac ~a ?br ?bc b see BLAS documentation!
m : default = number of rows of b
n : default = number of columns of b
side : default = `L (left - multiplication is ab)
up : default = true (upper triangular portion of a is accessed)
transa : default = `N
diag : default = `N (non-unit)
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
br : default = 1
bc : default = 1
val trsm : ?m:int ->
?n:int ->
?side:Lacaml_common.side ->
?up:bool ->
?transa:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
a:Lacaml_float64.mat -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
trsm ?m ?n ?side ?up ?transa ?diag ?alpha ?ar ?ac ~a ?br ?bc b see BLAS documentation!
Returns matrix b, which is overwritten.
m : default = number of rows of b
n : default = number of columns of b
side : default = `L (left - multiplication is ab)
up : default = true (upper triangular portion of a is accessed)
transa : default = `N
diag : default = `N (non-unit)
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
br : default = 1
bc : default = 1
val syrk : ?n:int ->
?k:int ->
?up:bool ->
?beta:Lacaml_float64.num_type ->
?cr:int ->
?cc:int ->
?c:Lacaml_float64.mat ->
?trans:Lacaml_common.trans2 ->
?alpha:Lacaml_float64.num_type ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.mat
syrk ?n ?k ?up ?beta ?cr ?cc ?c ?trans ?alpha ?ar ?ac a see BLAS documentation!
Returns matrix c, which is overwritten.
n : default = number of rows of a (or a'), c
k : default = number of columns of a (or a')
up : default = true (upper triangular portion of c is accessed)
beta : default = { re = 0.; im = 0. }
cr : default = 1
cc : default = 1
c : default = matrix with minimal required dimension
trans : default = `N
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
val syr2k : ?n:int ->
?k:int ->
?up:bool ->
?beta:Lacaml_float64.num_type ->
?cr:int ->
?cc:int ->
?c:Lacaml_float64.mat ->
?trans:Lacaml_common.trans2 ->
?alpha:Lacaml_float64.num_type ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?br:int -> ?bc:int -> Lacaml_float64.mat -> Lacaml_float64.mat
syr2k ?n ?k ?up ?beta ?cr ?cc ?c ?trans ?alpha ?ar ?ac a ?br ?bc b see BLAS documentation!
Returns matrix c, which is overwritten.
n : default = number of rows of a (or a'), c
k : default = number of columns of a (or a')
up : default = true (upper triangular portion of c is accessed)
beta : default = { re = 0.; im = 0. }
cr : default = 1
cc : default = 1
c : default = matrix with minimal required dimension
trans : default = `N
alpha : default = { re = 1.; im = 0. }
ar : default = 1
ac : default = 1
br : default = 1
bc : default = 1

LAPACK interface


LAPACK interface


Auxiliary routines

val lacpy : ?uplo:[ `L | `U ] ->
?m:int ->
?n:int ->
?br:int ->
?bc:int ->
?b:Lacaml_float64.mat ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.mat
lacpy ?uplo ?m ?n ?br ?bc ?b ?ar ?ac a copy a (triangular) (sub-)matrix a (to an optional (sub-)matrix b).
uplo : default = whole matrix
val lassq : ?n:int ->
?scale:float ->
?sumsq:float -> ?ofsx:int -> ?incx:int -> Lacaml_float64.vec -> float * float
lassq ?n ?ofsx ?incx ?scale ?sumsq
Returns (scl, ssq), where scl is a scaling factor and ssq the sum of squares of vector x starting at ofs and using increment incx and initial scale and sumsq. The following equality holds: scl**2. *. ssq = x.{1}**2. +. ... +. x.{n}**2. +. scale**2. *. sumsq. See LAPACK-documentation for details!
n : default = greater n s.t. ofsx+(n-1)(abs incx) <= dim x
scale : default = 0.
sumsq : default = 1.
ofsx : default = 1
incx : default = 1
val larnv : ?idist:[ `Normal | `Uniform0 | `Uniform1 ] ->
?iseed:Lacaml_common.int32_vec ->
?n:int -> ?ofsx:int -> ?x:Lacaml_float64.vec -> unit -> Lacaml_float64.vec
larnv ?idist ?iseed ?n ?ofsx ?x ()
Returns a random vector with random distribution as specifified by idist, random seed iseed, vector offset ofsx and optional vector x.
idist : default = `Normal
iseed : default = integer vector of size 4 with all ones.
n : default = dim x - ofsx + 1 if x is provided, 1 otherwise.
ofsx : default = 1
x : default = vector of length ofsx - 1 + n if n is provided.
val lange_min_lwork : int -> Lacaml_common.norm4 -> int
lange_min_lwork m norm
Returns the minimum length of the work array used by the lange-function.
val lange : ?m:int ->
?n:int ->
?norm:Lacaml_common.norm4 ->
?work:Lacaml_float64.rvec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> float
lange ?m ?n ?norm ?work ?ar ?ac a
Returns the value of the one norm (norm = `O), or the Frobenius norm (norm = `F), or the infinity norm (norm = `I), or the element of largest absolute value (norm = `M) of a real matrix a.
m : default = number of rows of matrix a
n : default = number of columns of matrix a
norm : default = `O
work : default = allocated work space for norm `I
ar : default = 1
ac : default = 1
val lauum : ?up:bool -> ?n:int -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> unit
lauum ?up ?n ?ar ?ac a computes the product U * U**T or L**T * L, where the triangular factor U or L is stored in the upper or lower triangular part of the array a. The upper or lower part of a is overwritten.
up : default = true
n : default = minimum of available number of rows/columns in matrix a
ar : default = 1
ac : default = 1

Linear equations (computational routines)

val getrf : ?m:int ->
?n:int ->
?ipiv:Lacaml_common.int32_vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_common.int32_vec
getrf ?m ?n ?ipiv ?ar ?ac a computes an LU factorization of a general m-by-n matrix a using partial pivoting with row interchanges. See LAPACK documentation.
Raises Failure if the matrix is singular.
Returns ipiv, the pivot indices.
m : default = number of rows in matrix a
n : default = number of columns in matrix a
ipiv : = vec of length min(m, n)
ar : default = 1
ac : default = 1
val getrs : ?n:int ->
?ipiv:Lacaml_common.int32_vec ->
?trans:Lacaml_float64.trans3 ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
getrs ?n ?ipiv ?trans ?ar ?ac a ?nrhs ?br ?bc b solves a system of linear equations a * X = b or a' * X = b with a general n-by-n matrix a using the LU factorization computed by Lacaml_D.getrf. Note that matrix a will be passed to Lacaml_D.getrf if ipiv was not provided.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
ipiv : default = result from getrf applied to a
trans : default = `N
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val getri_min_lwork : int -> int
getri_min_lwork n
Returns the minimum length of the work array used by the Lacaml_D.getri-function if the matrix has n columns.
val getri_opt_lwork : ?n:int -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
getri_opt_lwork ?n ?ar ?ac a
Returns the optimal size of the work array used by the Lacaml_D.getri-function.
n : default = number of columns of matrix a
ar : default = 1
ac : default = 1
val getri : ?n:int ->
?ipiv:Lacaml_common.int32_vec ->
?work:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> unit
getri ?n ?ipiv ?work ?ar ?ac a computes the inverse of a matrix using the LU factorization computed by Lacaml_D.getrf. Note that matrix a will be passed to Lacaml_D.getrf if ipiv was not provided.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
ipiv : default = vec of length m from getri
work : default = vec of optimum length
ar : default = 1
ac : default = 1
val sytrf_min_lwork : unit -> int
sytrf_min_lwork ()
Returns the minimum length of the work array used by the Lacaml_D.sytrf-function.
val sytrf_opt_lwork : ?n:int -> ?up:bool -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
sytrf_opt_lwork ?n ?up ?ar ?ac a
Returns the optimal size of the work array used by the Lacaml_D.sytrf-function.
n : default = number of columns of matrix a
up : default = true (store upper triangle in a)
ar : default = 1
ac : default = 1
val sytrf : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?work:Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_common.int32_vec
sytrf ?n ?up ?ipiv ?work ?ar ?ac a computes the factorization of the real symmetric matrix a using the Bunch-Kaufman diagonal pivoting method.
Raises Failure if D in a = U*D*U' or L*D*L' is singular.
n : default = number of columns in matrix a
up : default = true (store upper triangle in a)
ipiv : = vec of length n
work : default = vec of optimum length
ar : default = 1
ac : default = 1
val sytrs : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
sytrs ?n ?up ?ipiv ?ar ?ac a ?nrhs ?br ?bc b solves a system of linear equations a*X = b with a real symmetric matrix a using the factorization a = U*D*U**T or a = L*D*L**T computed by Lacaml_D.sytrf. Note that matrix a will be passed to Lacaml_D.sytrf if ipiv was not provided.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
up : default = true (store upper triangle in a)
ipiv : default = vec of length n
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val sytri_min_lwork : int -> int
sytri_min_lwork n
Returns the minimum length of the work array used by the Lacaml_D.sytri-function if the matrix has n columns.
val sytri : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?work:Lacaml_float64.vec -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> unit
sytri ?n ?up ?ipiv ?work ?ar ?ac a computes the inverse of the real symmetric indefinite matrix a using the factorization a = U*D*U**T or a = L*D*L**T computed by Lacaml_D.sytrf. Note that matrix a will be passed to Lacaml_D.sytrf if ipiv was not provided.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
up : default = true (store upper triangle in a)
ipiv : default = vec of length n from Lacaml_D.sytrf
work : default = vec of optimum length
ar : default = 1
ac : default = 1
val potrf : ?n:int ->
?up:bool ->
?ar:int ->
?ac:int -> ?jitter:Lacaml_float64.num_type -> Lacaml_float64.mat -> unit
potrf ?n ?up ?ar ?ac ?jitter a factorizes symmetric positive definite matrix a (or the designated submatrix) using Cholesky factorization.

Due to rounding errors ill-conditioned matrices may actually appear as if they were not positive definite, thus leading to an exception. One remedy for this problem is to add a small jitter to the diagonal of the matrix, which will usually allow Cholesky to complete successfully (though at a small bias). For extremely ill-conditioned matrices it is recommended to use (symmetric) eigenvalue decomposition instead of this function for a numerically more stable factorization.
Raises Failure if the matrix is singular.

n : default = number of columns in matrix a
up : default = true (store upper triangle in a)
ar : default = 1
ac : default = 1
jitter : default = nothing
val potrs : ?n:int ->
?up:bool ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int ->
?br:int ->
?bc:int ->
?factorize:bool ->
?jitter:Lacaml_float64.num_type -> Lacaml_float64.mat -> unit
potrs ?n ?up ?ar ?ac a ?nrhs ?br ?bc ?factorize ?jitter b solves a system of linear equations a*X = b, where a is symmetric positive definite matrix, using the Cholesky factorization a = U**T*U or a = L*L**T computed by Lacaml_D.potrf.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
up : default = true
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
factorize : default = true (calls Lacaml_D.potrf implicitly)
jitter : default = nothing
val potri : ?n:int ->
?up:bool ->
?ar:int ->
?ac:int ->
?factorize:bool ->
?jitter:Lacaml_float64.num_type -> Lacaml_float64.mat -> unit
potri ?n ?up ?ar ?ac ?factorize ?jitter a computes the inverse of the real symmetric positive definite matrix a using the Cholesky factorization a = U**T*U or a = L*L**T computed by Lacaml_D.potrf.
Raises Failure if the matrix is singular.
n : default = number of columns in matrix a
up : default = true (upper triangle stored in a)
ar : default = 1
ac : default = 1
factorize : default = true (calls Lacaml_D.potrf implicitly)
jitter : default = nothing
val trtrs : ?n:int ->
?up:bool ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
trtrs ?n ?up ?trans ?diag ?ar ?ac a ?nrhs ?br ?bc b solves a triangular system of the form a * X = b or a**T * X = n, where a is a triangular matrix of order n, and b is an n-by-nrhs matrix.
Raises Failure if the matrix a is singular.
n : default = number of columns in matrix a
up : default = true
trans : default = `N
diag : default = `N
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val tbtrs : ?n:int ->
?kd:int ->
?up:bool ->
?trans:Lacaml_float64.trans3 ->
?diag:Lacaml_common.diag ->
?abr:int ->
?abc:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
tbtrs ?n ?kd ?up ?trans ?diag ?abr ?abc ab ?nrhs ?br ?bc b solves a triangular system of the form a * X = b or a**T * X = b, where a is a triangular band matrix of order n, and b is an n-by-nrhs matrix.
Raises Failure if the matrix a is singular.
n : default = number of columns in matrix ab
kd : default = number of rows in matrix ab - 1
up : default = true
trans : default = `N
diag : default = `N
abr : default = 1
abc : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val trtri : ?n:int ->
?up:bool ->
?diag:Lacaml_common.diag -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> unit
trtri ?n ?up ?diag ?ar ?ac a computes the inverse of a real upper or lower triangular matrix a.
Raises Failure if the matrix a is singular.
n : default = number of columns in matrix a
up : default = true (upper triangle stored in a)
diag : default = `N
ar : default = 1
ac : default = 1
val geqrf_opt_lwork : ?m:int -> ?n:int -> ?ar:int -> ?ac:int -> Lacaml_float64.mat -> int
geqrf_opt_lwork ?m ?n ?ar ?ac a
Returns the optimum length of the work-array used by the Lacaml_D.geqrf-function given matrix a and optionally its logical dimensions m and n.
m : default = number of rows in matrix a
n : default = number of columns in matrix a
ar : default = 1
ac : default = 1
val geqrf_min_lwork : n:int -> int
geqrf_min_lwork ~n
Returns the minimum length of the work-array used by the Lacaml_D.geqrf-function if the matrix has n columns.
val geqrf : ?m:int ->
?n:int ->
?work:Lacaml_float64.vec ->
?tau:Lacaml_float64.vec ->
?ar:int -> ?ac:int -> Lacaml_float64.mat -> Lacaml_float64.vec
geqrf ?m ?n ?work ?tau ?ar ?ac a computes a QR factorization of a real m-by-n matrix a. See LAPACK documentation.
Returns tau, the scalar factors of the elementary reflectors.
m : default = number of rows in matrix a
n : default = number of columns in matrix a
work : default = vec of optimum length
tau : default = vec of required length
ar : default = 1
ac : default = 1

Linear equations (simple drivers)

val gesv : ?n:int ->
?ipiv:Lacaml_common.int32_vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
gesv ?n ?ipiv ?ar ?ac a ?nrhs ?br ?bc b computes the solution to a real system of linear equations a * X = b, where a is an n-by-n matrix and X and b are n-by-nrhs matrices. The LU decomposition with partial pivoting and row interchanges is used to factor a as a = P * L * U, where P is a permutation matrix, L is unit lower triangular, and U is upper triangular. The factored form of a is then used to solve the system of equations a * X = b. On exit, b contains the solution matrix X.
Raises Failure if the matrix a is singular.
n : default = available number of columns in matrix a
ipiv : default = vec of length n
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val gbsv : ?n:int ->
?ipiv:Lacaml_common.int32_vec ->
?abr:int ->
?abc:int ->
Lacaml_float64.mat ->
int -> int -> ?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
gbsv ?n ?ipiv ?abr ?abc ab kl ku ?nrhs ?br ?bc b computes the solution to a real system of linear equations a * X = b, where a is a band matrix of order n with kl subdiagonals and ku superdiagonals, and X and b are n-by-nrhs matrices. The LU decomposition with partial pivoting and row interchanges is used to factor a as a = L * U, where L is a product of permutation and unit lower triangular matrices with kl subdiagonals, and U is upper triangular with kl+ku superdiagonals. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix a is singular.
n : default = available number of columns in matrix ab
ipiv : default = vec of length n
abr : default = 1
abc : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val gtsv : ?n:int ->
?ofsdl:int ->
Lacaml_float64.vec ->
?ofsd:int ->
Lacaml_float64.vec ->
?ofsdu:int ->
Lacaml_float64.vec ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
gtsv ?n ?ofsdl dl ?ofsd d ?ofsdu du ?nrhs ?br ?bc b solves the equation a * X = b where a is an n-by-n tridiagonal matrix, by Gaussian elimination with partial pivoting. Note that the equation A'*X = b may be solved by interchanging the order of the arguments du and dl.
Raises Failure if the matrix is singular.
n : default = available length of vector d
ofsdl : default = 1
ofsd : default = 1
ofsdu : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val posv : ?n:int ->
?up:bool ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
posv ?n ?up ?ar ?ac a ?nrhs ?br ?bc b computes the solution to a real system of linear equations a * X = b, where a is an n-by-n symmetric positive definite matrix and X and b are n-by-nrhs matrices. The Cholesky decomposition is used to factor a as a = U**T * U, if up = true, or a = L * L**T, if up = false, where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix is singular.
n : default = available number of columns in matrix a
up : default = true i.e., upper triangle of a is stored
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val ppsv : ?n:int ->
?up:bool ->
?ofsap:int ->
Lacaml_float64.vec ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
ppsv ?n ?up ?ofsap ap ?nrhs ?br ?bc b computes the solution to the real system of linear equations a * X = b, where a is an n-by-n symmetric positive definite matrix stored in packed format and X and b are n-by-nrhs matrices. The Cholesky decomposition is used to factor a as a = U**T * U, if up = true, or a = L * L**T, if up = false, where U is an upper triangular matrix and L is a lower triangular matrix. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix is singular.
n : default = the greater n s.t. n(n+1)/2 <= Vec.dim ap
up : default = true i.e., upper triangle of ap is stored
ofsap : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val pbsv : ?n:int ->
?up:bool ->
?kd:int ->
?abr:int ->
?abc:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
pbsv ?n ?up ?kd ?abr ?abc ab ?nrhs ?br ?bc b computes the solution to a real system of linear equations a * X = b, where a is an n-by-n symmetric positive definite band matrix and X and b are n-by-nrhs matrices. The Cholesky decomposition is used to factor a as a = U**T * U, if up = true, or a = L * L**T, if up = false, where U is an upper triangular band matrix, and L is a lower triangular band matrix, with the same number of superdiagonals or subdiagonals as a. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix is singular.
n : default = available number of columns in matrix ab
up : default = true i.e., upper triangle of ab is stored
kd : default = available number of rows in matrix ab - 1
abr : default = 1
abc : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val ptsv : ?n:int ->
?ofsd:int ->
Lacaml_float64.vec ->
?ofse:int ->
Lacaml_float64.vec ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
ptsv ?n ?ofsd d ?ofse e ?nrhs ?br ?bc b computes the solution to the real system of linear equations a*X = b, where a is an n-by-n symmetric positive definite tridiagonal matrix, and X and b are n-by-nrhs matrices. A is factored as a = L*D*L**T, and the factored form of a is then used to solve the system of equations.
Raises Failure if the matrix is singular.
n : default = available length of vector d
ofsd : default = 1
ofse : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val sysv_opt_lwork : ?n:int ->
?up:bool ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
sysv_opt_lwork ?n ?up ?ar ?ac a ?nrhs ?br ?bc b
Returns the optimum length of the work-array used by the sysv-function given matrix a, optionally its logical dimension n and given right hand side matrix b with an optional number nrhs of vectors.
n : default = available number of columns in matrix a
up : default = true i.e., upper triangle of a is stored
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val sysv : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?work:Lacaml_float64.vec ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
sysv ?n ?up ?ipiv ?work ?ar ?ac a ?nrhs ?br ?bc b computes the solution to a real system of linear equations a * X = b, where a is an N-by-N symmetric matrix and X and b are n-by-nrhs matrices. The diagonal pivoting method is used to factor a as a = U * D * U**T, if up = true, or a = L * D * L**T, if up = false, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix is singular.
n : default = available number of columns in matrix a
up : default = true i.e., upper triangle of a is stored
ipiv : default = vec of length n
work : default = vec of optimum length (-> sysv_opt_lwork)
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val spsv : ?n:int ->
?up:bool ->
?ipiv:Lacaml_common.int32_vec ->
?ofsap:int ->
Lacaml_float64.vec ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
spsv ?n ?up ?ipiv ?ofsap ap ?nrhs ?br ?bc b computes the solution to the real system of linear equations a * X = b, where a is an n-by-n symmetric matrix stored in packed format and X and b are n-by-nrhs matrices. The diagonal pivoting method is used to factor a as a = U * D * U**T, if up = true, or a = L * D * L**T, if up = false, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored form of a is then used to solve the system of equations a * X = b.
Raises Failure if the matrix is singular.
n : default = the greater n s.t. n(n+1)/2 <= Vec.dim ap
up : default = true i.e., upper triangle of ap is stored
ipiv : default = vec of length n
ofsap : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1

Least squares (simple drivers)

val gels_min_lwork : m:int -> n:int -> nrhs:int -> int
gels_min_lwork ~m ~n ~nrhs
Returns the minimum length of the work-array used by the gels-function if the logical dimensions of the matrix are m rows and n columns and if there are nrhs right hand side vectors.
val gels_opt_lwork : ?m:int ->
?n:int ->
?trans:Lacaml_common.trans2 ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> int
gels_opt_lwork ?m ?n ?trans ?ar ?ac a ?nrhs ?br ?bc b
Returns the optimum length of the work-array used by the gels-function given matrix a, optionally its logical dimensions m and n and given right hand side matrix b with an optional number nrhs of vectors.
m : default = available number of rows in matrix a
n : default = available number of columns in matrix a
trans : default = `N
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1
val gels : ?m:int ->
?n:int ->
?work:Lacaml_float64.vec ->
?trans:Lacaml_common.trans2 ->
?ar:int ->
?ac:int ->
Lacaml_float64.mat ->
?nrhs:int -> ?br:int -> ?bc:int -> Lacaml_float64.mat -> unit
gels ?m ?n ?work ?trans ?ar ?ac a ?nrhs ?br ?bc b see LAPACK documentation!
m : default = available number of rows in matrix a
n : default = available number of columns of matrix a
work : default = vec of optimum length (-> Lacaml_D.gels_opt_lwork)
trans : default = `N
ar : default = 1
ac : default = 1
nrhs : default = available number of columns in matrix b
br : default = 1
bc : default = 1