def test_mean_srl(self): '''Test of mean calculation for SRL model.''' Gamma_L = 1. Gamma_R = 0.5 expected_mean = utils.mean_srl(Gamma_L, Gamma_R) srl_solver = utils.setup_srl_solver_from_hilbert_space( Gamma_L, Gamma_R) self.assertAlmostEqual(expected_mean, srl_solver.mean())
def test_generate_cumulant_srl(self): Gamma_R = 0.5; Gamma_L = 1. expected_mean = utils.mean_srl(Gamma_L, Gamma_R) expected_F2 = utils.zero_freq_F2_srl(Gamma_L, Gamma_R) expected_F3 = utils.skewness_srl(0, 0, Gamma_L, Gamma_R) srl_solver = utils.setup_srl_solver_from_hilbert_space(Gamma_L, Gamma_R) self.assertAlmostEqual(expected_mean, srl_solver.generate_cumulant(1)[0][0]) self.assertAlmostEqual(expected_F2, srl_solver.generate_cumulant(2)[0][1]) self.assertAlmostEqual(expected_F3, srl_solver.generate_cumulant(3)[0][2])
def test_generate_cumulant_srl(self): Gamma_R = 0.5 Gamma_L = 1. expected_mean = utils.mean_srl(Gamma_L, Gamma_R) expected_F2 = utils.zero_freq_F2_srl(Gamma_L, Gamma_R) expected_F3 = utils.skewness_srl(0, 0, Gamma_L, Gamma_R) srl_solver = utils.setup_srl_solver_from_hilbert_space( Gamma_L, Gamma_R) self.assertAlmostEqual(expected_mean, srl_solver.generate_cumulant(1)[0][0]) self.assertAlmostEqual(expected_F2, srl_solver.generate_cumulant(2)[0][1]) self.assertAlmostEqual(expected_F3, srl_solver.generate_cumulant(3)[0][2])
def test_mean_srl(self): '''Test of mean calculation for SRL model.''' Gamma_L = 1.; Gamma_R = 0.5 expected_mean = utils.mean_srl(Gamma_L, Gamma_R) srl_solver = utils.setup_srl_solver_from_hilbert_space(Gamma_L, Gamma_R) self.assertAlmostEqual(expected_mean, srl_solver.mean())