From 1568bb1b7e773100482972a252c50ac14e5d9d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paula=20H=C3=A4hndel?= Date: Tue, 23 Jul 2019 15:31:28 +0200 Subject: [PATCH] add more tests for IsDiagonalMat, IsUpperTriangularMat, IsLowerTriangularMat --- tst/testinstall/matrix.tst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tst/testinstall/matrix.tst b/tst/testinstall/matrix.tst index 813b7e9360..fe99ac1004 100644 --- a/tst/testinstall/matrix.tst +++ b/tst/testinstall/matrix.tst @@ -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)); @@ -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)); @@ -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]];;