Module Expr Str Import alias identifier Assign NameStore Str Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Str body Expr Str TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index CompareEq NameLoad Num Num For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd SubscriptLoad NameLoad ExtSlice Index NameLoad Slice SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str ImportFrom alias Assign NameStore Call NameLoad Lambda arguments args defaults Call NameLoad Lambda arguments args defaults Call NameLoad Str For NameStore NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore UnaryOpNot Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad If NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad Call NameLoad NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad For NameStore NameLoad body For NameStore NameLoad body For NameStore NameLoad body If CompareGt SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad BinOpAdd SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Return TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Return SubscriptLoad Call NameLoad NameLoad keyword NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias TryExcept body Import alias handlers ExceptHandler body Raise Call NameLoad Str decorator_list
N/A N/A Floyd-Warshall algorithm for shortest paths.
 N/A networkx nx N/A __author__ Aric Hagberg <aric.hagberg@gmail.com> N/A __all__ N/A floyd_warshall floyd_warshall_predecessor_and_distance floyd_warshall_numpy floyd_warshall_numpy N/A N/A G nodelist weight N/A None weight N/A N/A Find all-pairs shortest path lengths using Floyd's algorithm.

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

    nodelist : list, optional
       The rows and columns are ordered by the nodes in nodelist.
       If nodelist is None then the ordering is produced by G.nodes().

    weight: string, optional (default= 'weight')
       Edge data key corresponding to the edge weight.

    Returns
    -------
    distance : NumPy matrix
        A matrix of shortest path distances between nodes.
        If there is no path between to nodes the corresponding matrix entry
        will be Inf.

    Notes
    ------
    Floyd's algorithm is appropriate for finding shortest paths in
    dense graphs or graphs with negative weights when Dijkstra's
    algorithm fails.  This algorithm can still fail if there are
    negative cycles.  It has running time O(n^3) with running space of O(n^2).
     N/A N/A N/A numpy np N/A N/A N/A ImportError N/A N/A N/A ImportError to_numpy_matrix() requires numpy: http://scipy.org/  N/A A N/A N/A nx to_numpy_matrix G nodelist nodelist multigraph_weight min weight weight nonedge N/A np inf N/A N/A n m N/A A shape N/A I N/A N/A np identity n N/A N/A A N/A N/A I 1 0 N/A i N/A range n N/A N/A A N/A N/A np minimum A N/A N/A A N/A N/A i N/A N/A A N/A N/A N/A i N/A A N/A floyd_warshall_predecessor_and_distance N/A N/A G weight N/A weight N/A N/A Find all-pairs shortest path lengths using Floyd's algorithm.

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

    weight: string, optional (default= 'weight')
       Edge data key corresponding to the edge weight.

    Returns
    -------
    predecessor,distance : dictionaries
       Dictionaries, keyed by source and target, of predecessors and distances
       in the shortest path.

    Notes
    ------
    Floyd's algorithm is appropriate for finding shortest paths
    in dense graphs or graphs with negative weights when Dijkstra's algorithm
    fails.  This algorithm can still fail if there are negative cycles.
    It has running time O(n^3) with running space of O(n^2).

    See Also
    --------
    floyd_warshall
    floyd_warshall_numpy
    all_pairs_shortest_path
    all_pairs_shortest_path_length
     collections defaultdict N/A dist N/A defaultdict N/A N/A N/A N/A N/A defaultdict N/A N/A N/A N/A N/A float inf N/A u G N/A N/A N/A N/A dist N/A u N/A u 0 N/A pred N/A defaultdict dict N/A undirected N/A N/A N/A G is_directed N/A N/A u v d N/A N/A G edges data True N/A N/A e_weight N/A N/A d get weight 1.0 N/A N/A N/A dist N/A u N/A v N/A min e_weight N/A N/A dist N/A u N/A v N/A N/A N/A pred N/A u N/A v u N/A undirected N/A N/A N/A N/A dist N/A v N/A u N/A min e_weight N/A N/A dist N/A v N/A u N/A N/A N/A pred N/A v N/A u v N/A w G N/A N/A u G N/A N/A v G N/A N/A N/A N/A N/A dist N/A u N/A v N/A N/A N/A dist N/A u N/A w N/A N/A dist N/A w N/A v N/A N/A N/A N/A dist N/A u N/A v N/A N/A N/A dist N/A u N/A w N/A N/A dist N/A w N/A v N/A N/A N/A pred N/A u N/A v N/A N/A pred N/A w N/A v N/A N/A N/A dict pred N/A dict dist N/A floyd_warshall N/A N/A G weight N/A weight N/A N/A Find all-pairs shortest path lengths using Floyd's algorithm.

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

    weight: string, optional (default= 'weight')
       Edge data key corresponding to the edge weight.


    Returns
    -------
    distance : dict
       A dictionary,  keyed by source and target, of shortest paths distances
       between nodes.

    Notes
    ------
    Floyd's algorithm is appropriate for finding shortest paths
    in dense graphs or graphs with negative weights when Dijkstra's algorithm
    fails.  This algorithm can still fail if there are negative cycles.
    It has running time O(n^3) with running space of O(n^2).

    See Also
    --------
    floyd_warshall_predecessor_and_distance
    floyd_warshall_numpy
    all_pairs_shortest_path
    all_pairs_shortest_path_length
     N/A N/A N/A floyd_warshall_predecessor_and_distance G weight weight N/A 1 N/A setup_module N/A N/A module N/A N/A nose SkipTest N/A N/A N/A numpy N/A N/A N/A N/A N/A SkipTest NumPy not available N/A