forked from Qiskit/rustworkx
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a new function eigenvector_centrality() to compute the eigenvector centrality of a graph. It uses the same power function approach that the NetworkX function eigenvector_centrality() [1] function uses. This is for two reasons, the first is that a more traditional eigenvector linear algebra/BLAS function would either require us to link against BLAS at build time (which is a big change in the build system and a large requirement) or to call out to numpy via python both of which seemed less than ideal. The second reason was to make handling holes in node indices bit easier. Using this approach also enabled us to put the implementation in retworkx-core so it can be reused with any petgraph graph. Part of Qiskit#441
- Loading branch information
Showing
7 changed files
with
444 additions
and
1 deletion.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/add-eigenvector-centrality-e8ca30e31738a666.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
features: | ||
- | | ||
Added a new function, :func:`~.eigenvector_centrality()` which is used to | ||
compute the eigenvector centrality for all nodes in a given graph. | ||
- | | ||
Added a new function to retworkx-core ``eigenvector_centrality`` which is | ||
used to compute the eigenvector centrality for all nodes in a given graph. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.