test_tau_bounds.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Population-Model-Compare 作者: selotape 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号