def test_bounder_bounds_multiple_pops():
ABC = Population(name='ABC')
AB = Population(name='AB', father=ABC)
C = Population(name='C', father=ABC)
A = Population(name='A', father=AB)
B = Population(name='B', father=AB)
AB.left, AB.right = A, B
ABC.left, ABC.right = AB, C
a = Event(time=0.0, lca_pop=A)
c = Event(time=0.0, lca_pop=C)
ac = Event(time=0.5, left=a, right=c)
tau_bounds = find_tau_bounds(ac)
assert isclose(tau_bounds[AB], ac.time)
assert isclose(tau_bounds[ABC], ac.time)
test_tau_bounds.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录