def test_c_entry_is_summand_over_doubled_squared_sigma_when_only_one_relevant_comparison(self): res = c_m_n( f=self.default_f, m=0, n=2, comparisons=a([ [0, 2], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, -.250644809 / 8.0)
def test_c_entry_with_two_constrasting_comparisons(self): res = c_m_n( f=self.default_f, m=0, n=2, comparisons=a([ [0, 2], [2, 0], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, -.136719008)
def test_c_entry_doubles_with_two_positive_comparisons_where_m_and_n_are_same(self): res = c_m_n( f=self.default_f, m=0, n=0, comparisons=a([ [0, 2], [0, 2], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, .501289618 / 8.0)
def test_c_entry_zero_if_no_relevant_comparisons(self): res = c_m_n( f=self.default_f, m=0, n=2, comparisons=a([ [1, 1], [1, 1], [1, 1], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, 0.0)