Skip to content

Small tweaks to topology.shortest_distance docstrings

Mikuláš Poul requested to merge (removed):shortest-distance-docs into master

First change, to the dag parameter, is based on the following snippet in the code

    if source is not None:
        #...
        libgraph_tool_topology.get_dists(u._Graph__graph,
                                         int(source),
                                         target,
                                         _prop("v", u, dist_map),
                                         _prop("e", u, weights),
                                         _prop("v", u, pmap),
                                         float(max_dist),
                                         negative_weights, reached, dag)
    else:
        libgraph_tool_topology.get_all_dists(u._Graph__graph,
                                             _prop("v", u, dist_map),
                                             _prop("e", u, weights), dense)

Second change to complexities is based on the fact that do_all_pairs_search_unweighted in graph_all_distances.cc is running a BFS on all nodes, therefore that complexity, instead the complexity to Johnson or Floyd-Warshall...

Merge request reports