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

Add function to find densest subgraph #635

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

mtreinish
Copy link
Member

This commit adds a new function find_densest_subgraph_of_size() to
retworkx. This function is used to find a subgraph in a given graph of a
specified size that has the highest degree of connectivity of nodes.

Fixes #570

TODO:

  • Add more tests
  • Test with qiskit-terra's dense layout

This commit adds a new function find_densest_subgraph_of_size() to
retworkx. This function is used to find a subgraph in a given graph of a
specified size that has the highest degree of connectivity of nodes.

Fixes Qiskit#570
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2578936521

  • 97 of 131 (74.05%) changed or added relevant lines in 2 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 96.926%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/dense_subgraph.rs 95 129 73.64%
Files with Coverage Reduction New Missed Lines %
retworkx-core/src/centrality.rs 3 98.95%
retworkx-core/src/max_weight_matching.rs 4 99.34%
Totals Coverage Status
Change from base Build 2494694599: -0.2%
Covered Lines: 12772
Relevant Lines: 13177

💛 - Coveralls

src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
src/dense_subgraph.rs Outdated Show resolved Hide resolved
retworkx/__init__.py Outdated Show resolved Hide resolved
retworkx/__init__.py Outdated Show resolved Hide resolved
mtreinish and others added 2 commits September 19, 2022 15:58
Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com>
@coveralls
Copy link

coveralls commented Sep 19, 2022

Pull Request Test Coverage Report for Build 9685699622

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 123 of 221 (55.66%) changed or added relevant lines in 3 files are covered.
  • 301 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.9%) to 94.982%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rustworkx-core/src/dense_subgraph.rs 79 113 69.91%
src/dense_subgraph.rs 42 106 39.62%
Files with Coverage Reduction New Missed Lines %
rustworkx-core/src/dag_algo.rs 5 98.26%
src/json/mod.rs 9 93.23%
src/lib.rs 10 96.81%
src/json/node_link_data.rs 11 87.78%
src/connectivity/mod.rs 16 96.75%
src/digraph.rs 24 98.41%
src/graph.rs 27 97.26%
src/generators.rs 31 94.85%
rustworkx-core/src/generators/hexagonal_lattice_graph.rs 60 66.85%
src/iterators.rs 108 74.78%
Totals Coverage Status
Change from base Build 9565715860: -0.9%
Covered Lines: 18059
Relevant Lines: 19013

💛 - Coveralls

@IvanIsCoding IvanIsCoding added this to the 0.13.0 milestone Oct 4, 2022
@mtreinish mtreinish removed this from the 0.13.0 milestone May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a function to find densest subgraph
4 participants