def test_fourth(self): result = antipode_ck(self.t3_2) expected = LinearCombination() expected[Forest((self.t3_2, ))] = -1 expected[Forest((self.t2_1, self.t1_1))] = 2 expected[Forest((self.t1_1, self.t1_1, self.t1_1))] = -1 self.assertEqual(expected, result)
def test_first(self): result = antipode_ck(self.t1_1) expected = LinearCombination() expected[Forest((leaf, ))] = -1 self.assertEqual(expected, result)
def test_second(self): result = antipode_ck(self.t2_1) expected = LinearCombination() expected[Forest((self.t2_1, ))] = -1 expected[Forest((self.t1_1, self.t1_1))] = 1 self.assertEqual(expected, result)
def test_empty(self): result = antipode_ck(self.et) expected = LinearCombination() expected[empty_tree] = 1 self.assertEqual(expected, result)