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 Difference operator #293

Merged
merged 5 commits into from
Jul 12, 2021
Merged

Conversation

sharanry
Copy link
Contributor

@sharanry sharanry commented Jul 9, 2021

SciML/ModelingToolkit.jl#1088 (comment)

This PR aims to add the Difference operator to enable defining fixed discrete step state transitions.

@YingboMa
CC: @ChrisRackauckas

@sharanry
Copy link
Contributor Author

sharanry commented Jul 9, 2021

I am unsure what kind of functionality needs to be offered by the Difference operator as part of Symbolics.
Going through the Differential operator, I noticed that it offers compositions, equality, expand_derivatives to name a few -- I am still trying to understand what would be the equivalent for the Difference operator. I have started off by implementing basic equality and hashing functionality.

@ChrisRackauckas
Copy link
Member

For now we can keep it barebones and add features to it as it grows.

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2021

Codecov Report

Merging #293 (d65c4bf) into master (eeee436) will increase coverage by 0.16%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   75.78%   75.95%   +0.16%     
==========================================
  Files          19       20       +1     
  Lines        1817     1834      +17     
==========================================
+ Hits         1377     1393      +16     
- Misses        440      441       +1     
Impacted Files Coverage Δ
src/Symbolics.jl 100.00% <ø> (ø)
src/difference.jl 87.50% <87.50%> (ø)
src/utils.jl 71.05% <0.00%> (ø)
src/num.jl 64.28% <0.00%> (+0.64%) ⬆️
src/build_function.jl 69.06% <0.00%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eeee436...d65c4bf. Read the comment docs.

@sharanry sharanry requested a review from ChrisRackauckas July 12, 2021 15:31
@YingboMa YingboMa merged commit df6b5fc into JuliaSymbolics:master Jul 12, 2021
@sharanry sharanry changed the title [WIP] Add Difference operator Add Difference operator Jul 15, 2021
@sharanry sharanry deleted the sy/add_difference branch July 15, 2021 16: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.

4 participants