lapack/testlapack: add test for randomOrthogonal

... and remove the orthogonality assertion in randomOrthogonal.
This commit is contained in:
Vladimir Chalupecky
2018-07-23 11:49:36 +02:00
committed by Vladimír Chalupecký
parent 99b6f69bff
commit ac556fa015
2 changed files with 10 additions and 3 deletions

View File

@@ -89,3 +89,13 @@ func TestDlagge(t *testing.T) {
}
}
func TestRandomOrthogonal(t *testing.T) {
rnd := rand.New(rand.NewSource(1))
for n := 1; n <= 20; n++ {
q := randomOrthogonal(n, rnd)
if !isOrthogonal(q) {
t.Errorf("Case n=%v: Q not orthogonal", n)
}
}
}