diff --git a/lapack/testlapack/dgeql2.go b/lapack/testlapack/dgeql2.go index e93d4f51..36c4ae7e 100644 --- a/lapack/testlapack/dgeql2.go +++ b/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, diff --git a/lapack/testlapack/dlatrd.go b/lapack/testlapack/dlatrd.go index 3bd45923..871f106f 100644 --- a/lapack/testlapack/dlatrd.go +++ b/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) { diff --git a/lapack/testlapack/dorg2l.go b/lapack/testlapack/dorg2l.go index 0558b964..62296b71 100644 --- a/lapack/testlapack/dorg2l.go +++ b/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++ { diff --git a/lapack/testlapack/dsteqr.go b/lapack/testlapack/dsteqr.go index fcc49d09..55978645 100644 --- a/lapack/testlapack/dsteqr.go +++ b/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++ {