def test_encode_vectors_4x3_4(self): input = [1, 1, 1] gen_matrix = [[1, 1, 0, 0], [0, 1, 1, 1], [1, 0, 1, 0]] output = [0, 0, 0, 1] rez = encoder.encode_vector(input, gen_matrix) self.assertEqual(rez, output)
def test_encode_1_1x1(self): input = [1] gen_matrix = [[1]] output = [1] rez = encoder.encode_vector(input, gen_matrix) self.assertEqual(rez, output)
def test_encode_10_2x2(self): input = [1, 0] gen_matrix = [[1, 0], [1, 1]] output = [1, 0] rez = encoder.encode_vector(input, gen_matrix) self.assertEqual(rez, output)