mirror of
https://github.com/gonum/gonum.git
synced 2025-10-18 21:15:23 +08:00
lapack,native,cgo: rename JobEV to EVJob
This commit is contained in:
@@ -1419,7 +1419,7 @@ func (impl Implementation) Dpocon(uplo blas.Uplo, n int, a []float64, lda int, a
|
|||||||
// The C interface does not support providing temporary storage. To provide compatibility
|
// The C interface does not support providing temporary storage. To provide compatibility
|
||||||
// with native, lwork == -1 will not run Dsyev but will instead write the minimum
|
// with native, lwork == -1 will not run Dsyev but will instead write the minimum
|
||||||
// work necessary to work[0]. If len(work) < lwork, Dsyev will panic.
|
// work necessary to work[0]. If len(work) < lwork, Dsyev will panic.
|
||||||
func (impl Implementation) Dsyev(jobz lapack.JobEV, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) {
|
func (impl Implementation) Dsyev(jobz lapack.EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) {
|
||||||
checkMatrix(n, n, a, lda)
|
checkMatrix(n, n, a, lda)
|
||||||
if lwork == -1 {
|
if lwork == -1 {
|
||||||
work[0] = 3*float64(n) - 1
|
work[0] = 3*float64(n) - 1
|
||||||
|
@@ -33,7 +33,7 @@ type Float64 interface {
|
|||||||
Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
|
Dormlq(side blas.Side, trans blas.Transpose, m, n, k int, a []float64, lda int, tau, c []float64, ldc int, work []float64, lwork int)
|
||||||
Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
|
Dpocon(uplo blas.Uplo, n int, a []float64, lda int, anorm float64, work []float64, iwork []int) float64
|
||||||
Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool)
|
Dpotrf(ul blas.Uplo, n int, a []float64, lda int) (ok bool)
|
||||||
Dsyev(jobz JobEV, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
|
Dsyev(jobz EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
|
||||||
Dtrcon(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64
|
Dtrcon(norm MatrixNorm, uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int, work []float64, iwork []int) float64
|
||||||
Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool)
|
Dtrtri(uplo blas.Uplo, diag blas.Diag, n int, a []float64, lda int) (ok bool)
|
||||||
Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool)
|
Dtrtrs(uplo blas.Uplo, trans blas.Transpose, diag blas.Diag, n, nrhs int, a []float64, lda int, b []float64, ldb int) (ok bool)
|
||||||
@@ -122,11 +122,11 @@ const (
|
|||||||
EigBoth EigComp = 'I'
|
EigBoth EigComp = 'I'
|
||||||
)
|
)
|
||||||
|
|
||||||
// JobEV specifies whether eigenvectors will be computed in Dsyev.
|
// EVJob specifies whether eigenvectors will be computed in Dsyev.
|
||||||
type JobEV byte
|
type EVJob byte
|
||||||
|
|
||||||
// ComputeEV specifies that eigenvectors will be computed in Dsyev.
|
// ComputeEV specifies that eigenvectors will be computed in Dsyev.
|
||||||
const ComputeEV JobEV = 'V'
|
const ComputeEV EVJob = 'V'
|
||||||
|
|
||||||
// Jobs for Dgebal.
|
// Jobs for Dgebal.
|
||||||
const (
|
const (
|
||||||
|
@@ -352,7 +352,7 @@ func Pocon(a blas64.Symmetric, anorm float64, work []float64, iwork []int) float
|
|||||||
// lwork >= 3*n-1, and Syev will panic otherwise. The amount of blocking is
|
// lwork >= 3*n-1, and Syev will panic otherwise. The amount of blocking is
|
||||||
// limited by the usable length. If lwork == -1, instead of computing Syev the
|
// limited by the usable length. If lwork == -1, instead of computing Syev the
|
||||||
// optimal work length is stored into work[0].
|
// optimal work length is stored into work[0].
|
||||||
func Syev(jobz lapack.JobEV, a blas64.Symmetric, w, work []float64, lwork int) (ok bool) {
|
func Syev(jobz lapack.EVJob, a blas64.Symmetric, w, work []float64, lwork int) (ok bool) {
|
||||||
return lapack64.Dsyev(jobz, a.Uplo, a.N, a.Data, a.Stride, w, work, lwork)
|
return lapack64.Dsyev(jobz, a.Uplo, a.N, a.Data, a.Stride, w, work, lwork)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ import (
|
|||||||
// lwork >= 3*n-1, and Dsyev will panic otherwise. The amount of blocking is
|
// lwork >= 3*n-1, and Dsyev will panic otherwise. The amount of blocking is
|
||||||
// limited by the usable length. If lwork == -1, instead of computing Dsyev the
|
// limited by the usable length. If lwork == -1, instead of computing Dsyev the
|
||||||
// optimal work length is stored into work[0].
|
// optimal work length is stored into work[0].
|
||||||
func (impl Implementation) Dsyev(jobz lapack.JobEV, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) {
|
func (impl Implementation) Dsyev(jobz lapack.EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool) {
|
||||||
checkMatrix(n, n, a, lda)
|
checkMatrix(n, n, a, lda)
|
||||||
upper := uplo == blas.Upper
|
upper := uplo == blas.Upper
|
||||||
wantz := jobz == lapack.ComputeEV
|
wantz := jobz == lapack.ComputeEV
|
||||||
|
@@ -15,7 +15,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Dsyever interface {
|
type Dsyever interface {
|
||||||
Dsyev(jobz lapack.JobEV, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
|
Dsyev(jobz lapack.EVJob, uplo blas.Uplo, n int, a []float64, lda int, w, work []float64, lwork int) (ok bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
func DsyevTest(t *testing.T, impl Dsyever) {
|
func DsyevTest(t *testing.T, impl Dsyever) {
|
||||||
|
Reference in New Issue
Block a user