1 // Copyright ©2015 The Gonum Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package lapack // import "gonum.org/v1/gonum/lapack"
7 import "gonum.org/v1/gonum/blas"
15 // Complex128 defines the public complex128 LAPACK API supported by gonum/lapack.
16 type Complex128 interface{}
18 // Float64 defines the public float64 LAPACK API supported by gonum/lapack.
19 type Float64 interface {
20 Dgecon(norm MatrixNorm, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
21 Dgeev(jobvl LeftEVJob, jobvr RightEVJob, n int, a []float64, lda int, wr, wi []float64, vl []float64, ldvl int, vr []float64, ldvr int, work []float64, lwork int) (first int)
22 Dgels(trans blas.Transpose, m, n, nrhs int, a []float64, lda int, b []float64, ldb int, work []float64, lwork int) bool
23 Dgelqf(m, n int, a []float64, lda int, tau, work []float64, lwork int)
24 Dgeqrf(m, n int, a []float64, lda int, tau, work []float64, lwork int)
25 Dgesvd(jobU, jobVT SVDJob, m, n int, a []float64, lda int, s, u []float64, ldu int, vt []float64, ldvt int, work []float64, lwork int) (ok bool)
26 Dgetrf(m, n int, a []float64, lda int, ipiv []int) (ok bool)
27 Dgetri(n int, a []float64, lda int, ipiv []int, work []float64, lwork int) (ok bool)
28 Dgetrs(trans blas.Transpose, n, nrhs int, a []float64, lda int, ipiv []int, b []float64, ldb int)
29 Dggsvd3(jobU, jobV, jobQ GSVDJob, m, n, p int, a []float64, lda int, b []float64, ldb int, alpha, beta, u []float64, ldu int, v []float64, ldv int, q []float64, ldq int, work []float64, lwork int, iwork []int) (k, l int, ok bool)
30 Dlantr(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, m, n int, a []float64, lda int, work []float64) float64
31 Dlange(norm MatrixNorm, m, n int, a []float64, lda int, work []float64) float64
32 Dlansy(norm MatrixNorm, uplo blas.Uplo, n int, a []float64, lda int, work []float64) float64
33 Dlapmt(forward bool, m, n int, x []float64, ldx int, k []int)
34 Dormqr(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
35 Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
36 Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
37 Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool)
38 Dsyev(jobz EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
39 Dtrcon(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64
40 Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool)
41 Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool)
44 // Direct specifies the direction of the multiplication for the Householder matrix.
48 Forward Direct = 'F' // Reflectors are right-multiplied, H_0 * H_1 * ... * H_{k-1}.
49 Backward Direct = 'B' // Reflectors are left-multiplied, H_{k-1} * ... * H_1 * H_0.
52 // Sort is the sorting order.
56 SortIncreasing Sort = 'I'
57 SortDecreasing Sort = 'D'
60 // StoreV indicates the storage direction of elementary reflectors.
64 ColumnWise StoreV = 'C' // Reflector stored in a column of the matrix.
65 RowWise StoreV = 'R' // Reflector stored in a row of the matrix.
68 // MatrixNorm represents the kind of matrix norm to compute.
72 MaxAbs MatrixNorm = 'M' // max(abs(A(i,j))) ('M')
73 MaxColumnSum MatrixNorm = 'O' // Maximum column sum (one norm) ('1', 'O')
74 MaxRowSum MatrixNorm = 'I' // Maximum row sum (infinity norm) ('I', 'i')
75 NormFrob MatrixNorm = 'F' // Frobenius norm (sqrt of sum of squares) ('F', 'f', E, 'e')
78 // MatrixType represents the kind of matrix represented in the data.
82 General MatrixType = 'G' // A dense matrix (like blas64.General).
83 UpperTri MatrixType = 'U' // An upper triangular matrix.
84 LowerTri MatrixType = 'L' // A lower triangular matrix.
87 // Pivot specifies the pivot type for plane rotations
96 type DecompUpdate byte
99 ApplyP DecompUpdate = 'P'
100 ApplyQ DecompUpdate = 'Q'
103 // SVDJob specifies the singular vector computation type for SVD.
107 SVDAll SVDJob = 'A' // Compute all singular vectors
108 SVDInPlace SVDJob = 'S' // Compute the first singular vectors and store them in provided storage.
109 SVDOverwrite SVDJob = 'O' // Compute the singular vectors and store them in input matrix
110 SVDNone SVDJob = 'N' // Do not compute singular vectors
113 // GSVDJob specifies the singular vector computation type for Generalized SVD.
117 GSVDU GSVDJob = 'U' // Compute orthogonal matrix U
118 GSVDV GSVDJob = 'V' // Compute orthogonal matrix V
119 GSVDQ GSVDJob = 'Q' // Compute orthogonal matrix Q
120 GSVDUnit GSVDJob = 'I' // Use unit-initialized matrix
121 GSVDNone GSVDJob = 'N' // Do not compute orthogonal matrix
124 // EVComp specifies how eigenvectors are computed.
128 // OriginalEV specifies to compute the eigenvectors of the original
130 OriginalEV EVComp = 'V'
131 // TridiagEV specifies to compute both the eigenvectors of the input
132 // tridiagonal matrix.
133 TridiagEV EVComp = 'I'
134 // HessEV specifies to compute both the eigenvectors of the input upper
135 // Hessenberg matrix.
138 // UpdateSchur specifies that the matrix of Schur vectors will be
139 // updated by Dtrexc.
140 UpdateSchur EVComp = 'V'
143 // Job types for computation of eigenvectors.
150 // Job constants for computation of eigenvectors.
152 ComputeEV EVJob = 'V' // Compute eigenvectors in Dsyev.
153 ComputeLeftEV LeftEVJob = 'V' // Compute left eigenvectors.
154 ComputeRightEV RightEVJob = 'V' // Compute right eigenvectors.
161 PermuteScale Job = 'B'
164 // Job constants for Dhseqr.
166 EigenvaluesOnly EVJob = 'E'
167 EigenvaluesAndSchur EVJob = 'S'
170 // EVSide specifies what eigenvectors will be computed.
173 // EVSide constants for Dtrevc3.
175 RightEV EVSide = 'R' // Compute right eigenvectors only.
176 LeftEV EVSide = 'L' // Compute left eigenvectors only.
177 RightLeftEV EVSide = 'B' // Compute both right and left eigenvectors.
180 // HowMany specifies which eigenvectors will be computed.
183 // HowMany constants for Dhseqr.
185 AllEV HowMany = 'A' // Compute all right and/or left eigenvectors.
186 AllEVMulQ HowMany = 'B' // Compute all right and/or left eigenvectors multiplied by an input matrix.
187 SelectedEV HowMany = 'S' // Compute selected right and/or left eigenvectors.