Skip to content

Implement DualMatrix to be able to solve 2nd order problems#26

Open
max-vassili3v wants to merge 17 commits intodlfivefifty:mainfrom
max-vassili3v:dual-matrix
Open

Implement DualMatrix to be able to solve 2nd order problems#26
max-vassili3v wants to merge 17 commits intodlfivefifty:mainfrom
max-vassili3v:dual-matrix

Conversation

@max-vassili3v
Copy link
Copy Markdown
Collaborator

This PR provides a minimal implementation of DualMatrix so that we are able to do 2nd order differentiation (as shown by the example in the unit tests) by allowing DualVectors with a DualVector value and a DualMatrix jacobian, thus being able to create 'nested dual arrays'. That can propagate higher order derivatives. We have:

  • Constructor for DualMatrix
  • Basic indexing of DualMatrices
  • Some bug fixes surrounding promotion
  • Remove unnecessary project dependencies

Next steps:

  • Make DualMatrix fully functional and behave as expected with existing types (DualMatrix-DualVector multiplication, reshape, etc.)
  • Look into dependencies that can help with sparse/efficient tensor calculations (SparseArrayKit.jl, TensorOperations.jl)

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 78.37838% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.87%. Comparing base (5761344) to head (374f054).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/types.jl 68.42% 6 Missing ⚠️
src/arithmetic.jl 75.00% 1 Missing ⚠️
src/utilities.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   70.87%   71.87%   +1.00%     
==========================================
  Files           5        5              
  Lines         103      128      +25     
==========================================
+ Hits           73       92      +19     
- Misses         30       36       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant