On 11.09.2015 19:15, Christopher Morris wrote: > Thanks for the quick response. > > dist = shortest_distance(g, source=v) > k_disk = GraphView(g, vfilt=dist.fa <= k) > > This will work. But doesn't it first compute the shortest distance > from v to all other vertices in g and then applies a filter? This is > rather inefficient, especially when then graph is huge...
You can set "max_dist" in shortest_distance() to limit the search. Best, Tiago -- Tiago de Paula Peixoto <ti...@skewed.de>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list graph-tool@skewed.de http://lists.skewed.de/mailman/listinfo/graph-tool