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

Apply hash consing to all BasicSymbolic subtypes #673

Merged
merged 16 commits into from
Nov 30, 2024

Conversation

Blablablanca
Copy link
Contributor

@bowenszhu
Copy link
Member

bowenszhu commented Nov 25, 2024

The last commit f2d7791 implements the change to hash2 to ensure that a [with metadata] + b and a [no metadata] + b have different hashes. The recursive approach now incorporates metadata and symtype information of nodes in symbolic tree, correctly distinguishing these cases. The hash2 function could be optimized further in a future PR, for example, by adding a field to the BasicSymbolic struct to cache hash values and avoid redundant computations. The ordering of symbolic objects is not dependent on hash2, allowing for future refactoring of this function.

@bowenszhu bowenszhu marked this pull request as ready for review November 27, 2024 23:21
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.04%. Comparing base (0288135) to head (d716d3b).
Report is 75 commits behind head on master.

Files with missing lines Patch % Lines
src/types.jl 97.77% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #673      +/-   ##
==========================================
+ Coverage   81.86%   82.04%   +0.18%     
==========================================
  Files          16       16              
  Lines        1908     1933      +25     
==========================================
+ Hits         1562     1586      +24     
- Misses        346      347       +1     

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

@ChrisRackauckas ChrisRackauckas merged commit 59e3aa6 into JuliaSymbolics:master Nov 30, 2024
6 of 10 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.

Hash consing
4 participants