test_bipartite.py 文件源码

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

项目:matchpy 作者: HPAC 项目源码 文件源码
def bipartite_graph(draw):
    m = draw(st.integers(min_value=1, max_value=4))
    n = draw(st.integers(min_value=m, max_value=5))

    graph = BipartiteGraph()
    for i in range(n):
        for j in range(m):
            b = draw(st.booleans())
            if b:
                graph[i, j] = b

    return graph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号