ccc_graph.py 文件源码

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

项目:ccc_helper 作者: TimothyZhang 项目源码 文件源码
def add_assets_to_graph(g, assets):
    """
    :param nx.Graph g:
    :param Sequence[Asset] assets:
    """
    for asset in assets:
        if not asset.referers and not asset.referents:
            continue

        add_node(g, asset)

    for asset in assets:
        if not asset.referers and not asset.referents:
            continue

        for ref in asset.referers:
            g.add_edge(ref.relative_path, asset.relative_path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号