Exemplo n.º 1
0
 def test_not_square_matrix(self):
     not_square_matrix = BisymmetricMatrix()
     not_square_matrix.init_matrix([[1, 2], [3]])
     self.assertFalse(not_square_matrix.is_persymmetric())
Exemplo n.º 2
0
 def test_correct_persymmetric_matrix(self):
     persymmetric_matrix = BisymmetricMatrix()
     persymmetric_matrix.init_matrix([[1, 2, 3], [4, 1, 2], [5, 4, 1]])
     self.assertTrue(persymmetric_matrix.is_persymmetric())
Exemplo n.º 3
0
 def test_generate_bisymmetric_is_persymmetric(self):
     correct_bisymmetric_matrix = BisymmetricMatrix()
     correct_bisymmetric_matrix.generate_bisymmetric_matrix_by_vector(
         [1, 2])
     self.assertTrue(correct_bisymmetric_matrix.is_persymmetric())
Exemplo n.º 4
0
 def test_0_size_matrix(self):
     empty_matrix = BisymmetricMatrix()
     empty_matrix.init_matrix([])
     self.assertTrue(empty_matrix.is_persymmetric())
Exemplo n.º 5
0
 def test_generate_bisymmetric_is_persymmetric(self):
     correct_bisymmetric_matrix = BisymmetricMatrix()
     correct_bisymmetric_matrix.generate_random_bisymmetric_matrix(5)
     self.assertTrue(correct_bisymmetric_matrix.is_persymmetric())