oschulz / AutoDiffOperators.jl

Operators based on automatic differentiation in Julia
Other
4 stars 1 forks source link

Explicit operator type argument in with_jacobian #5

Closed oschulz closed 1 year ago

oschulz commented 1 year ago

Changes with_jacobian to take operator type argument, so users should now do

with_jacobian(f, x, LinearMap, ad)
with_jacobian(f, x, MatrixLikeOperator, ad)
with_jacobian(f, x, Matrix, ad)

MatrixLikeOperator can be deprecated and removed in future releases since LinearMaps has a pretty low load time now.

CC @dkarrasch

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 48.48% and project coverage change: -3.16 :warning:

Comparison is base (4c9e206) 79.15% compared to head (797062b) 76.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5 +/- ## ========================================== - Coverage 79.15% 76.00% -3.16% ========================================== Files 9 10 +1 Lines 355 375 +20 ========================================== + Hits 281 285 +4 - Misses 74 90 +16 ``` | [Impacted Files](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz) | Coverage Δ | | |---|---|---| | [src/AutoDiffOperators.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-c3JjL0F1dG9EaWZmT3BlcmF0b3JzLmps) | `100.00% <ø> (ø)` | | | [src/ad\_selector.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-c3JjL2FkX3NlbGVjdG9yLmps) | `47.61% <ø> (ø)` | | | [src/mulfunc\_operator.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-c3JjL211bGZ1bmNfb3BlcmF0b3Iuamw=) | `0.00% <0.00%> (ø)` | | | [ext/AutoDiffOperatorsEnzymeExt.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-ZXh0L0F1dG9EaWZmT3BlcmF0b3JzRW56eW1lRXh0Lmps) | `100.00% <100.00%> (ø)` | | | [ext/AutoDiffOperatorsForwardDiffExt.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-ZXh0L0F1dG9EaWZmT3BlcmF0b3JzRm9yd2FyZERpZmZFeHQuamw=) | `74.28% <100.00%> (+0.75%)` | :arrow_up: | | [ext/AutoDiffOperatorsLinearMapsExt.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-ZXh0L0F1dG9EaWZmT3BlcmF0b3JzTGluZWFyTWFwc0V4dC5qbA==) | `76.92% <100.00%> (+4.19%)` | :arrow_up: | | [ext/AutoDiffOperatorsZygoteExt.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-ZXh0L0F1dG9EaWZmT3BlcmF0b3JzWnlnb3RlRXh0Lmps) | `84.61% <100.00%> (ø)` | | | [src/jacobian.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-c3JjL2phY29iaWFuLmps) | `82.75% <100.00%> (+0.40%)` | :arrow_up: | | [src/matrix\_like\_operator.jl](https://app.codecov.io/gh/oschulz/AutoDiffOperators.jl/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Oliver+Schulz#diff-c3JjL21hdHJpeF9saWtlX29wZXJhdG9yLmps) | `79.76% <100.00%> (+0.23%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.