Module Expr Str Import alias identifier Assign NameStore Call AttributeLoad Str attr ListLoad Str Str Assign NameStore ListLoad Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore Num If CompareIs NameLoad NameLoad body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd NameStore Call NameLoad Call AttributeLoad NameLoad attr orelse For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad AugAssignAdd NameStore Call NameLoad Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict For NameStore NameLoad body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpSub NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
Vitality measures.
 N/A networkx nx N/A __author__ N/A N/A join N/A Aric Hagberg (hagberg@lanl.gov) Renato Fabbri N/A __all__ N/A closeness_vitality weiner_index N/A N/A G weight N/A None N/A N/A weiner 0.0 N/A N/A weight None N/A N/A n G N/A N/A path_length N/A N/A nx single_source_shortest_path_length G n N/A weiner N/A sum N/A N/A path_length values N/A N/A n G N/A N/A path_length N/A N/A nx single_source_dijkstra_path_length G n weight weight N/A weiner N/A sum N/A N/A path_length values N/A weiner N/A closeness_vitality N/A N/A G weight N/A None N/A N/A Compute closeness vitality for nodes.

    Closeness vitality of a node is the change in the sum of distances
    between all node pairs when excluding that node.

    Parameters
    ----------
    G : graph

    weight : None or string (optional)
       The name of the edge attribute used as weight. If None the edge
       weights are ignored.

    Returns
    -------
    nodes : dictionary
       Dictionary with nodes as keys and closeness vitality as the value.

    Examples
    --------
    >>> G=nx.cycle_graph(3)
    >>> nx.closeness_vitality(G)
    {0: 4.0, 1: 4.0, 2: 4.0}

    See Also
    --------
    closeness_centrality()

    References
    ----------
    .. [1] Ulrik Brandes, Sec. 3.6.2 in
       Network Analysis: Methodological Foundations, Springer, 2005.
       http://books.google.com/books?id=TTNhSm7HYrIC
     N/A multigraph N/A N/A G is_multigraph N/A wig N/A weiner_index G weight N/A closeness_vitality N/A N/A n G N/A N/A multigraph N/A N/A edges N/A N/A G edges n data True keys True N/A N/A N/A G is_directed N/A N/A edges N/A N/A G in_edges n data True keys True N/A N/A edges N/A N/A G edges n data True N/A N/A N/A G is_directed N/A N/A edges N/A N/A G in_edges n data True N/A N/A N/A G remove_edges_from edges N/A N/A closeness_vitality N/A n N/A wig N/A weiner_index G weight N/A N/A N/A G add_edges_from edges N/A closeness_vitality N/A