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

Fixing node and edge numbers in graphs containing subgraphs. #22

Closed
wants to merge 5 commits into from

Conversation

mpan322
Copy link
Contributor

@mpan322 mpan322 commented May 14, 2024

Summary

Fixed the issue above and added tests for this property.
I also fixed any existing tests which were broken by the change.
The solution works by summing the total number of edges in a graphs as well as any of it's subgraphs.

Behavioural Oddities

There is one oddity this implementation #results in.
A subgraph can contain edges between nodes not contained within it or it's children.
This means that there can be 20 edges within a subgraph but no nodes so when calling ViewString the output may be somewhat surprising (ie. <graph test with 0 nodes and 20 edges>).
This however would logically follow from the code which created the graph as well as the DOT code outputted.
Let me know if you think there is a better alternative behaviour.

… `IsGVContext`).

This fixes digraphs#23.

Also going to add additional funcitonality to improve usability.
@james-d-mitchell
Copy link
Member

I think the test failure is due to changes I made in #21, which I think I now fixed, so probably rebasing will work.

@mpan322 mpan322 deleted the branch digraphs:main May 19, 2024 08:03
@mpan322 mpan322 closed this May 19, 2024
@mpan322 mpan322 deleted the main branch May 19, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants