lapack: rename EVSide consts
MODIFY
lapack/gonum/dgeev.go
lapack/gonum/dgeev.go
@@ -119,9 +119,9 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
impl.Dhseqr(lapack.EigenvaluesAndSchur, lapack.OriginalEV, n, 0, n-1,
nil, 1, nil, nil, nil, 1, work, -1)
maxwrk = max(maxwrk, max(n+1, n+int(work[0])))
- side := lapack.LeftEV
+ side := lapack.EVLeft
if wantvr {
- side = lapack.RightEV
+ side = lapack.EVRight
}
impl.Dtrevc3(side, lapack.AllEVMulQ, nil, n, nil, 1, nil, 1, nil, 1,
n, work, -1)
@@ -169,7 +169,7 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
var side lapack.EVSide
if wantvl {
- side = lapack.LeftEV
+ side = lapack.EVLeft
// Copy Householder vectors to VL.
impl.Dlacpy(blas.Lower, n, n, a, lda, vl, ldvl)
// Generate orthogonal matrix in VL.
@@ -181,11 +181,11 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
if wantvr {
// Want left and right eigenvectors.
// Copy Schur vectors to VR.
- side = lapack.RightLeftEV
+ side = lapack.EVRightLeft
impl.Dlacpy(blas.All, n, n, vl, ldvl, vr, ldvr)
}
} else if wantvr {
- side = lapack.RightEV
+ side = lapack.EVRight
// Copy Householder vectors to VR.
impl.Dlacpy(blas.Lower, n, n, a, lda, vr, ldvr)
// Generate orthogonal matrix in VR.
@@ -221,7 +221,7 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
bi := blas64.Implementation()
if wantvl {
// Undo balancing of left eigenvectors.
- impl.Dgebak(lapack.PermuteScale, lapack.LeftEV, n, ilo, ihi, workbal, n, vl, ldvl)
+ impl.Dgebak(lapack.PermuteScale, lapack.EVLeft, n, ilo, ihi, workbal, n, vl, ldvl)
// Normalize left eigenvectors and make largest component real.
for i, wii := range wi {
if wii < 0 {
@@ -248,7 +248,7 @@ func (impl Implementation) Dgeev(jobvl lapack.LeftEVJob, jobvr lapack.RightEVJob
}
if wantvr {
// Undo balancing of right eigenvectors.
- impl.Dgebak(lapack.PermuteScale, lapack.RightEV, n, ilo, ihi, workbal, n, vr, ldvr)
+ impl.Dgebak(lapack.PermuteScale, lapack.EVRight, n, ilo, ihi, workbal, n, vr, ldvr)
// Normalize right eigenvectors and make largest component real.
for i, wii := range wi {
if wii < 0 {

MODIFY
lapack/lapack.go
lapack/lapack.go
@@ -178,14 +178,13 @@ const (
EigenvaluesAndSchur SchurJob = 'S'
)
-// EVSide specifies what eigenvectors will be computed.
+// EVSide specifies what eigenvectors are computed in Dtrevc3.
type EVSide byte
-// EVSide constants for Dtrevc3.
const (
- RightEV EVSide = 'R' // Compute right eigenvectors only.
- LeftEV EVSide = 'L' // Compute left eigenvectors only.
- RightLeftEV EVSide = 'B' // Compute both right and left eigenvectors.
+ EVRight EVSide = 'R' // Only right eigenvectors are computed.
+ EVLeft EVSide = 'L' // Only left eigenvectors are computed.
+ EVRightLeft EVSide = 'B' // Both right and left eigenvectors are computed.
)
// HowMany specifies which eigenvectors will be computed.

MODIFY
lapack/testlapack/dgebak.go
lapack/testlapack/dgebak.go
@@ -23,7 +23,7 @@ func DgebakTest(t *testing.T, impl Dgebaker) {
rnd := rand.New(rand.NewSource(1))
for _, job := range []lapack.BalanceJob{lapack.None, lapack.Permute, lapack.Scale, lapack.PermuteScale} {
- for _, side := range []lapack.EVSide{lapack.LeftEV, lapack.RightEV} {
+ for _, side := range []lapack.EVSide{lapack.EVLeft, lapack.EVRight} {
for _, n := range []int{0, 1, 2, 3, 4, 5, 6, 10, 18, 31, 53} {
for _, extra := range []int{0, 11} {
for cas := 0; cas < 100; cas++ {
@@ -96,7 +96,7 @@ func testDgebak(t *testing.T, impl Dgebaker, job lapack.BalanceJob, side lapack.
// Compute D*V or D^{-1}*V and store into dv.
dv := zeros(n, m, m)
- if side == lapack.RightEV {
+ if side == lapack.EVRight {
blas64.Gemm(blas.NoTrans, blas.NoTrans, 1, d, v, 0, dv)
} else {
blas64.Gemm(blas.NoTrans, blas.NoTrans, 1, dinv, v, 0, dv)

MODIFY
lapack/testlapack/dtrevc3.go
lapack/testlapack/dtrevc3.go
@@ -22,8 +22,8 @@ type Dtrevc3er interface {
func Dtrevc3Test(t *testing.T, impl Dtrevc3er) {
rnd := rand.New(rand.NewSource(1))
- for _, side := range []lapack.EVSide{lapack.RightEV, lapack.LeftEV, lapack.RightLeftEV} {
- for _, howmny := range []lapack.HowMany{lapack.AllEV, lapack.AllEVMulQ, lapack.SelectedEV} {
+ for _, side := range []lapack.EVSide{lapack.EVRight, lapack.EVLeft, lapack.EVRightLeft} {
+ for _, howmny := range []lapack.EVHowMany{lapack.EVAll, lapack.EVAllMulQ, lapack.EVSelected} {
for _, n := range []int{0, 1, 2, 3, 4, 5, 10, 34, 100} {
for _, extra := range []int{0, 11} {
for _, optwork := range []bool{true, false} {
@@ -43,8 +43,8 @@ func testDtrevc3(t *testing.T, impl Dtrevc3er, side lapack.EVSide, howmny lapack
n := tmat.Rows
extra := tmat.Stride - tmat.Cols
- right := side != lapack.LeftEV
- left := side != lapack.RightEV
+ right := side != lapack.EVLeft
+ left := side != lapack.EVRight
var selected, selectedWant []bool
var mWant int // How many columns will the eigenvectors occupy.

lapack: rename EVSide consts