Position_Drift.py 文件源码

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

项目:PhD 作者: wutaoadeny 项目源码 文件源码
def Sum_of_weight(G):
    #nx.number_of_edges(nx.ego_graph(Hub_ego,n,1))
    EdgeList = G.edges(data=True)  #[(0, 1, {}), (1, 2, {}), (2, 3, {})]
    #print EdgeList
    Sum_of_weight = 0.0
    for edge in EdgeList:
        Sum_of_weight = Sum_of_weight + edge[2]['weight'] #weight=string.atof(line[3]),timestamp=string.atof(line[5]
    #end for
    return Sum_of_weight
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号