Re: [graph-tool] ranking vertices by value of vertex property

2020-07-07 Thread Ioana Hulpus
Great, thanks a lot! -Ioana On Tue, Jul 7, 2020 at 4:29 PM Tiago de Paula Peixoto wrote: > Am 07.07.20 um 15:39 schrieb Ioana K-Hulpus: > > Hi, > > I ran PageRank on my graph, and now I need to get the top-k highest > scored. > > Is there any faster / more straightforward way of achieving this t

Re: [graph-tool] ranking vertices by value of vertex property

2020-07-07 Thread Tiago de Paula Peixoto
Am 07.07.20 um 15:39 schrieb Ioana K-Hulpus: > Hi, > I ran PageRank on my graph, and now I need to get the top-k highest scored. > Is there any faster / more straightforward way of achieving this than by > creating and then sorting a new dictionary, as in the following method? Yes, you can access

[graph-tool] ranking vertices by value of vertex property

2020-07-07 Thread Ioana K-Hulpus
Hi, I ran PageRank on my graph, and now I need to get the top-k highest scored. Is there any faster / more straightforward way of achieving this than by creating and then sorting a new dictionary, as in the following method? def top_k_page_rank(g, pagerank_prop, k): pr_sorted_scores = sort_pa