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 direct versions of 4 generators #785

Closed
wants to merge 14 commits into from

Conversation

enavarro51
Copy link
Contributor

Fixes #751.

This PR adds directed versions of the lollipop, barbell, full_rary_tree, and petersen generators. It's based on #784, and should be merged after that one.

@coveralls
Copy link

coveralls commented Jan 15, 2023

Pull Request Test Coverage Report for Build 3925466615

  • 302 of 413 (73.12%) changed or added relevant lines in 6 files are covered.
  • 44 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.007%) to 95.942%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rustworkx-core/src/generators/full_rary_tree_graph.rs 39 40 97.5%
rustworkx-core/src/generators/lollipop_graph.rs 11 18 61.11%
rustworkx-core/src/generators/petersen_graph.rs 7 18 38.89%
rustworkx-core/src/generators/barbell_graph.rs 14 27 51.85%
src/generators.rs 217 296 73.31%
Files with Coverage Reduction New Missed Lines %
src/shortest_path/all_pairs_bellman_ford.rs 1 98.88%
src/generators.rs 43 82.97%
Totals Coverage Status
Change from base Build 3916313470: -1.007%
Covered Lines: 13596
Relevant Lines: 14171

💛 - Coveralls

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am against this getting merged because the directed version of some of the graphs you proposed are not common or useful. I will take for example the Generalized Petersen graph, but it also applies to the others.

By definition the graph is undirected. Almost all of the literature about the graph is about it being undirected and its properties that are related to that. Why would we generate a graph that people don't use? It misses the point of why generators exist.

If someone ever needs the topology of some of the graphs and needs to change from undirected to directed, they can call to_directed() and it works. So I'd rather not merge this

@enavarro51
Copy link
Contributor Author

Thanks for the feedback, Ivan. I was only doing it for consistency reasons and if they're not needed, best not to add them. I'll close this.

@enavarro51 enavarro51 closed this Feb 1, 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.

Push generators into rustworkx-core
3 participants