testlapack: move and document residualOrthogonal
MODIFY
lapack/testlapack/dgeev.go
lapack/testlapack/dgeev.go
@@ -837,45 +837,3 @@ func residualLeftEV(a, e blas64.General, wr, wi []float64) float64 {
}
return math.Min(errnorm/anorm, 1)
}
-
-func dlange(norm lapack.MatrixNorm, m, n int, a []float64, lda int) float64 {
- if m == 0 || n == 0 {
- return 0
- }
- switch norm {
- case lapack.MaxAbs:
- var value float64
- for i := 0; i < m; i++ {
- for j := 0; j < n; j++ {
- value = math.Max(value, math.Abs(a[i*lda+j]))
- }
- }
- return value
- case lapack.MaxColumnSum:
- work := make([]float64, n)
- for i := 0; i < m; i++ {
- for j := 0; j < n; j++ {
- work[j] += math.Abs(a[i*lda+j])
- }
- }
- var value float64
- for i := 0; i < n; i++ {
- value = math.Max(value, work[i])
- }
- return value
- case lapack.MaxRowSum:
- var value float64
- for i := 0; i < m; i++ {
- var sum float64
- for j := 0; j < n; j++ {
- sum += math.Abs(a[i*lda+j])
- }
- value = math.Max(value, sum)
- }
- return value
- case lapack.Frobenius:
- panic("not implemented")
- default:
- panic("bad MatrixNorm")
- }
-}

testlapack: move and document residualOrthogonal