rustworkx icon indicating copy to clipboard operation
rustworkx copied to clipboard

Weighted betweenness centrality

Open fabmazz opened this issue 1 year ago • 1 comments

What is the expected enhancement?

It would be very cool to implement the calculation of betweenness centrality using the edges weights, as done in NetworkX : https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.centrality.betweenness_centrality.html

I'm guessing that since there is already some shortest paths methods which use network weights, it shouldn't be so difficult to add.

Thanks for the excellent work!

fabmazz avatar Apr 29 '24 14:04 fabmazz

I think we can have weighted_betweenness_centrality as a method. The code will probably look completely different because we exploit the fact that betweenness_centrality is unweighted to speed the shortest path algorithm and paralellize steps, but I think we can implement the weighted_betweenness_centrality with Floyd-Warshall

IvanIsCoding avatar Apr 30 '24 12:04 IvanIsCoding