lapack: rename EigComp to EVComp

This follows the naming style of EVJob and EVSide.
This commit is contained in:
Vladimir Chalupecky
2016-10-08 22:58:37 +09:00
parent f3d79efebc
commit a219b045f0
6 changed files with 11 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ const (
badDims = "lapack: bad input dimensions"
badDirect = "lapack: bad direct"
badE = "lapack: e has insufficient length"
badEigComp = "lapack: bad EigComp"
badEVComp = "lapack: bad EVComp"
badEVSide = "lapack: bad EVSide"
badHowMany = "lapack: bad HowMany"
badIlo = "lapack: ilo out of range"

View File

@@ -108,16 +108,16 @@ const (
SVDNone SVDJob = 'N' // Do not compute singular vectors
)
// EigComp specifies the type of eigenvalue decomposition.
type EigComp byte
// EVComp specifies how eigenvectors are computed.
type EVComp byte
const (
// EigDecomp specifies to compute the eigenvalues and eigenvectors of the
// full symmetric matrix.
EigDecomp EigComp = 'V'
EigDecomp EVComp = 'V'
// EigBoth specifies to compute both the eigenvalues and eigenvectors of the
// input tridiagonal matrix.
EigBoth EigComp = 'I'
EigBoth EVComp = 'I'
)
// Job types for computation of eigenvectors.

View File

@@ -36,7 +36,7 @@ import (
// and Dsteqr will panic otherwise.
//
// Dsteqr is an internal routine. It is exported for testing purposes.
func (impl Implementation) Dsteqr(compz lapack.EigComp, n int, d, e, z []float64, ldz int, work []float64) (ok bool) {
func (impl Implementation) Dsteqr(compz lapack.EVComp, n int, d, e, z []float64, ldz int, work []float64) (ok bool) {
if len(d) < n {
panic(badD)
}
@@ -44,7 +44,7 @@ func (impl Implementation) Dsteqr(compz lapack.EigComp, n int, d, e, z []float64
panic(badE)
}
if compz != lapack.None && compz != lapack.EigBoth && compz != lapack.EigDecomp {
panic(badEigComp)
panic(badEVComp)
}
if compz != lapack.None {
if len(work) < max(1, 2*n-2) {

View File

@@ -97,7 +97,7 @@ func (impl Implementation) Dsyev(jobz lapack.EVJob, uplo blas.Uplo, n int, a []f
ok = impl.Dsterf(n, w, work[inde:])
} else {
impl.Dorgtr(uplo, n, a, lda, work[indtau:], work[indwork:], llwork)
ok = impl.Dsteqr(lapack.EigComp(jobz), n, w, work[inde:], a, lda, work[indtau:])
ok = impl.Dsteqr(lapack.EVComp(jobz), n, w, work[inde:], a, lda, work[indtau:])
}
if !ok {
return false

View File

@@ -26,7 +26,7 @@ const (
badDims = "lapack: bad input dimensions"
badDirect = "lapack: bad direct"
badE = "lapack: e has insufficient length"
badEigComp = "lapack: bad EigComp"
badEVComp = "lapack: bad EVComp"
badEVSide = "lapack: bad EVSide"
badHowMany = "lapack: bad HowMany"
badIlo = "lapack: ilo out of range"

View File

@@ -15,13 +15,13 @@ import (
)
type Dsteqrer interface {
Dsteqr(compz lapack.EigComp, n int, d, e, z []float64, ldz int, work []float64) (ok bool)
Dsteqr(compz lapack.EVComp, n int, d, e, z []float64, ldz int, work []float64) (ok bool)
Dorgtrer
}
func DsteqrTest(t *testing.T, impl Dsteqrer) {
rnd := rand.New(rand.NewSource(1))
for _, compz := range []lapack.EigComp{lapack.EigDecomp, lapack.EigBoth} {
for _, compz := range []lapack.EVComp{lapack.EigDecomp, lapack.EigBoth} {
for _, test := range []struct {
n, lda int
}{