remove_cycle_edges_by_hierarchy_voting.py 文件源码

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

项目:breaking_cycles_in_noisy_hierarchies 作者: zhenv5 项目源码 文件源码
def remove_cycle_edges_heuristic(graph_file,edges_score):

    g = nx.read_edgelist(graph_file,create_using = nx.DiGraph(),nodetype = int)

    from remove_self_loops import remove_self_loops_from_graph
    self_loops = remove_self_loops_from_graph(g)

    edges_to_be_removed = scc_based_to_remove_cycle_edges_iterately(g,edges_score)
    edges_to_be_removed = list(set(edges_to_be_removed))
    return edges_to_be_removed+self_loops
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号