Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degree centrality support #1129

Open
Paulo-21 opened this issue Mar 3, 2024 · 6 comments · May be fixed by #1145
Open

Degree centrality support #1129

Paulo-21 opened this issue Mar 3, 2024 · 6 comments · May be fixed by #1145
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Paulo-21
Copy link
Contributor

Paulo-21 commented Mar 3, 2024

What is the expected enhancement?

It would be nice if Rustworkx could support the Degree_centraly features like Networkx.
https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.centrality.degree_centrality.html

@IvanIsCoding IvanIsCoding added enhancement New feature or request good first issue Good for newcomers labels Mar 3, 2024
@IvanIsCoding
Copy link
Collaborator

Out of all the centralities discussed in #441, I firmly belive this is one of the easiest ones.

This would be a good first contribution for the folks that want to get started with the library

@IvanIsCoding IvanIsCoding changed the title Degree_centraly support Degree centrality support Mar 3, 2024
@TheMLEngineer
Copy link

Hi @IvanIsCoding , I want to start contributing. As this is my first time, requesting more info on the requirement. Thanks for your time.

@IvanIsCoding
Copy link
Collaborator

Hi @IvanIsCoding , I want to start contributing. As this is my first time, requesting more info on the requirement. Thanks for your time.

  1. Understand the formula for Degree Centrality
  2. Read https://github.com/Qiskit/rustworkx/blob/main/CONTRIBUTING.md
  3. You want to add a pure Rust function in https://github.com/Qiskit/rustworkx/blob/main/rustworkx-core/src/centrality.rs like the other centralities
  4. Then wrap your pure Rust function into a Python function in https://github.com/Qiskit/rustworkx/blob/main/src/centrality.rs
  5. Test it https://github.com/Qiskit/rustworkx/blob/main/tests/graph/test_centrality.py

@TheMLEngineer
Copy link

Thanks , Will submit code

@TheMLEngineer
Copy link

Submitted pull request #1145

@1ucian0 1ucian0 linked a pull request May 14, 2024 that will close this issue
@IvanIsCoding IvanIsCoding linked a pull request Jun 19, 2024 that will close this issue
@Gohlub
Copy link

Gohlub commented Nov 3, 2024

Submitted another pull request with the appropriate fixes: #1306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants