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 tools for symmetric bidigraphs #29

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Add tools for symmetric bidigraphs #29

merged 3 commits into from
Mar 20, 2024

Conversation

stecrotti
Copy link
Owner

After all i think all the new stuff in #28 is not really necessary.

This PR is a thinner alternative. It implements:

  • A function bidirected_with_mappings which takes an undirected graph and builds the corresponding bidirected graph. In addition it returns two mappings linking the indices of the edges of the two graphs. This turns out useful when you have some properties of the undirected edge (i,j) but you need it while looping on the directed edges.
  • A method issymmetric(g::IndexedBiDiGraph) that checks whether the graph has the property that for each edge i=>j there always exists the parallel edge j=>i. There's no need for a new type.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.09%. Comparing base (fe7aaa7) to head (4d2968a).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   83.08%   84.09%   +1.00%     
==========================================
  Files           8        8              
  Lines         331      352      +21     
==========================================
+ Hits          275      296      +21     
  Misses         56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stecrotti stecrotti merged commit a43ee1a into main Mar 20, 2024
8 checks passed
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.

1 participant