compute_topological_features.py 文件源码

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

项目:tweegraph 作者: PGryllos 项目源码 文件源码
def get_shortest_distance(pair_id):
    global graph
    id_1 = int(pair_id.split('_')[0])
    id_2 = int(pair_id.split('_')[1])
    try:
        return len(nx.shortest_path(graph, source=id_1, target=id_2)) - 1
    except:
        return -1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号