lapack/testlapack: fix comments and error messages about orthogonality
MODIFY
lapack/testlapack/dgeql2.go
lapack/testlapack/dgeql2.go
@@ -72,7 +72,7 @@ func Dgeql2Test(t *testing.T, impl Dgeql2er) {
blas64.Gemm(blas.NoTrans, blas.NoTrans, 1, h, qTmp, 0, q)
}
if !isOrthogonal(q) {
- t.Errorf("Q is not orthonormal")
+ t.Errorf("Q is not orthogonal")
}
l := blas64.General{
Rows: m,

MODIFY
lapack/testlapack/dlatrd.go
lapack/testlapack/dlatrd.go
@@ -134,7 +134,7 @@ func DlatrdTest(t *testing.T, impl Dlatrder) {
}
errStr := fmt.Sprintf("isUpper = %v, n = %v, nb = %v", uplo == blas.Upper, n, nb)
if !isOrthogonal(q) {
- t.Errorf("Q not orthonormal. %s", errStr)
+ t.Errorf("Q not orthogonal. %s", errStr)
}
aGen := genFromSym(blas64.Symmetric{N: n, Stride: lda, Uplo: uplo, Data: aCopy})
if !dlatrdCheckDecomposition(t, uplo, n, nb, e, tau, a, lda, aGen, q) {

MODIFY
lapack/testlapack/dorg2l.go
lapack/testlapack/dorg2l.go
@@ -48,12 +48,12 @@ func Dorg2lTest(t *testing.T, impl Dorg2ler) {
copy(aCopy, a)
impl.Dorg2l(m, n, k, a, lda, tau[n-k:], work)
if !hasOrthonormalColumns(m, n, a, lda) {
- t.Errorf("Q is not orthonormal. m = %v, n = %v, k = %v", m, n, k)
+ t.Errorf("Case m=%v, n=%v, k=%v: columns of Q not orthonormal", m, n, k)
}
}
}
-// hasOrthornormalColumns checks that the columns of a are orthonormal.
+// hasOrthonormalColumns returns whether the columns of A are orthonormal.
func hasOrthonormalColumns(m, n int, a []float64, lda int) bool {
for i := 0; i < n; i++ {
for j := i; j < n; j++ {

MODIFY
lapack/testlapack/dsteqr.go
lapack/testlapack/dsteqr.go
@@ -60,13 +60,14 @@ func DsteqrTest(t *testing.T, impl Dsteqrer) {
aCopy := make([]float64, len(a))
copy(aCopy, a)
if compz == lapack.OriginalEV {
- // Compute triangular decomposition and orthonormal matrix.
uplo := blas.Upper
tau := make([]float64, n)
work := make([]float64, 1)
impl.Dsytrd(blas.Upper, n, a, lda, d, e, tau, work, -1)
work = make([]float64, int(work[0]))
+ // Reduce A to symmetric tridiagonal form.
impl.Dsytrd(uplo, n, a, lda, d, e, tau, work, len(work))
+ // Compute the orthogonal matrix Q.
impl.Dorgtr(uplo, n, a, lda, tau, work, len(work))
} else {
for i := 0; i < n; i++ {

lapack/testlapack: fix comments and error messages about orthogonality