Esempio n. 1
0
File: stats.py Progetto: stablum/soa
def path_length():
    """
    average path length
    """
    dist = floyd_warshall.run(gi.nodes(),gi.edges())
    ret = floyd_warshall.avg(dist)
    return ret
Esempio n. 2
0
File: stats.py Progetto: stablum/soa
def total_weight():
    ret = 0.0
    for e in gi.edges():
        ret += gi.get_weight(e)
    return ret