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