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

Implement differential protocols for all Clojure collection types (autodiff #5) #222

Merged
merged 74 commits into from Jan 31, 2021

Conversation

sritchie
Copy link
Member

@sritchie sritchie commented Dec 28, 2020

From the CHANGELOG entry:

@sritchie sritchie changed the base branch from master to sritchie/diff_four December 28, 2020 19:02
@codecov-io
Copy link

codecov-io commented Dec 28, 2020

Codecov Report

Merging #222 (86f55e4) into sritchie/diff_four (53ba17a) will decrease coverage by 0.15%.
The diff coverage is 66.19%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##           sritchie/diff_four     #222      +/-   ##
======================================================
- Coverage               83.96%   83.80%   -0.16%     
======================================================
  Files                      80       81       +1     
  Lines                    8470     8523      +53     
  Branches                  456      459       +3     
======================================================
+ Hits                     7112     7143      +31     
- Misses                    902      921      +19     
- Partials                  456      459       +3     
Impacted Files Coverage Δ
src/sicmutils/operator.cljc 78.65% <0.00%> (-1.47%) ⬇️
src/sicmutils/value.cljc 82.88% <ø> (-0.32%) ⬇️
src/sicmutils/series.cljc 59.24% <20.00%> (-1.87%) ⬇️
src/sicmutils/matrix.cljc 83.07% <25.00%> (-0.56%) ⬇️
src/sicmutils/structure.cljc 84.93% <50.00%> (-0.91%) ⬇️
src/sicmutils/function.cljc 88.88% <66.66%> (+0.04%) ⬆️
src/sicmutils/collection.cljc 78.43% <78.43%> (ø)
... and 3 more

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 53ba17a...711ad43. Read the comment docs.

@sritchie sritchie added the Automatic Differentiation Bugs and issues related to Automatic Differentiation label Jan 4, 2021
@@ -105,7 +105,6 @@
`g/sin` has arity [:exactly 1]."))))

(deftest arity-tests
(arity-check identity "vector")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had mistakenly implemented arity for vectors to go check the arity of its contained functions. But this is wrong, because if you try to apply a vector (vs an up), Clojure has already provided an IFn implementation that simply looks up entries!

@sritchie sritchie changed the base branch from sritchie/diff_four to master January 31, 2021 14:55
@sritchie sritchie merged commit 1a501dd into master Jan 31, 2021
@@ -2,6 +2,13 @@

## [Unreleased]

- #222 adds `v/Value` implementations for Clojure sequences and maps. Maps and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider whether we could just get away with fmap?

@sritchie sritchie deleted the sritchie/diff_five branch May 3, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automatic Differentiation Bugs and issues related to Automatic Differentiation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants