Skip to content

Commit

Permalink
add more tests for IsDiagonalMat, IsUpperTriangularMat, IsLowerTriang…
Browse files Browse the repository at this point in the history
…ularMat
  • Loading branch information
PaulaHaehndel authored and wilfwilson committed Jul 30, 2019
1 parent 89e7fe2 commit 1568bb1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tst/testinstall/matrix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ gap> IsDiagonalMat([[1,0],[1,1]]);
false
gap> IsDiagonalMat([[1,1],[0,1]]);
false
gap> IsDiagonalMat([[1,0],[0,1],[0,1]]);
false
gap> IsDiagonalMat([[1,0],[0,1],[0,0]]);
true
gap> IsDiagonalMat([[1,0,0],[0,1,1]]);
false
gap> IsDiagonalMat([[1,0,0],[0,1,0]]);
true

#
gap> IsUpperTriangularMat(NullMat(3, 3));
Expand All @@ -29,6 +37,12 @@ gap> IsUpperTriangularMat([[1,0],[1,1]]);
false
gap> IsUpperTriangularMat([[1,1],[0,1]]);
true
gap> IsUpperTriangularMat([[1,1],[0,1],[0,1]]);
false
gap> IsUpperTriangularMat([[1,1],[0,1],[0,0]]);
true
gap> IsUpperTriangularMat([[1,1,1],[0,1,1]]);
true

#
gap> IsLowerTriangularMat(NullMat(3, 3));
Expand All @@ -45,6 +59,12 @@ gap> IsLowerTriangularMat([[1,0],[1,1]]);
true
gap> IsLowerTriangularMat([[1,1],[0,1]]);
false
gap> IsLowerTriangularMat([[1,0,0],[1,1,1]]);
false
gap> IsLowerTriangularMat([[1,0,0],[1,1,0]]);
true
gap> IsLowerTriangularMat([[1,0],[1,1],[1,1]]);
true

#
gap> m := Z(5)^0 * [[0, 1], [1, 0]];;
Expand Down

0 comments on commit 1568bb1

Please sign in to comment.