Qiskit / rustworkx

A high performance Python graph library implemented in Rust.
https://www.rustworkx.org
Apache License 2.0
981 stars 141 forks source link

Improve the performance of the Katz Centrality computation. #1173

Closed Paulo-21 closed 2 months ago

Paulo-21 commented 2 months ago

What is the expected enhancement?

Improve the performance of Katz Centrality.

I saw that for every iteration of all node the beta values was looked from a hashmap index by the node index (usize) exactely like the x vector . I think the hashmap could be replace with a simple vector, this lead to better performance. This could be done without breaking the api.