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 transformation/optimization to remove zero-valued subgraphs #168

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

dcerkoney
Copy link
Collaborator

@dcerkoney dcerkoney commented Dec 20, 2023

  1. Add a helper function disconnect_subgraphs!(g::AbstractGraph) to fully disconnect all subgraphs from a graph g
  2. Add a tree property has_zero_subfactors(g::AbstractGraph) which returns true if graph g is not a leaf and contains only zero subgraph factors
  3. Add transformations remove_zero_valued_subgraphs! and remove_zero_valued_subgraphs
  4. Add optimization remove_all_zero_valued_subgraphs!
  5. Add the relevant tests
  6. Bugfix in function to_dot_str and add html node labels for $\Pi$, $\Gamma^{(3)}$, and $\Gamma^{(4)}$ insertions

@dcerkoney dcerkoney added the enhancement New feature or request label Dec 20, 2023
@dcerkoney dcerkoney self-assigned this Dec 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2023

Codecov Report

Attention: 77 lines in your changes are missing coverage. Please review.

Comparison is base (7485eab) 61.39% compared to head (ad2b25d) 61.50%.

Files Patch % Lines
src/backend/to_dot.jl 0.00% 76 Missing ⚠️
src/computational_graph/transform.jl 94.11% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff               @@
##           computgraph     #168      +/-   ##
===============================================
+ Coverage        61.39%   61.50%   +0.10%     
===============================================
  Files               66       66              
  Lines             5010     5065      +55     
===============================================
+ Hits              3076     3115      +39     
- Misses            1934     1950      +16     

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

@dcerkoney dcerkoney merged commit aac010c into computgraph Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants