Skip to content

Wrap new galgebra 0.6.0 Mv methods#21

Open
utensil wants to merge 1 commit intomasterfrom
feat/13-wrap-new-mv-methods
Open

Wrap new galgebra 0.6.0 Mv methods#21
utensil wants to merge 1 commit intomasterfrom
feat/13-wrap-new-mv-methods

Conversation

@utensil
Copy link
Copy Markdown
Member

@utensil utensil commented Apr 3, 2026

Closes #13

Adds Julia wrappers for the new Mv methods introduced in galgebra 0.6.0:

Julia Python Notes
undual(A) A.undual() Inverse of dual()
mag2(A) A.mag2() Grade-wise Σ|norm2(⟨A⟩ᵣ)|; differs from norm()^2 for non-Euclidean metrics
mag(A) A.mag() sqrt(mag2(A)); equals norm() only for Euclidean
shirokov_inverse(A) A.shirokov_inverse() Works for any Clifford algebra
hitzer_inverse(A) A.hitzer_inverse() Efficient for n < 6
sp(A, B) A.sp(B) (A*B).scalar(), distinct from A ⊛ B = (A*~B).scalar()

Also verifies that the new g_invol() and ccon() Python-side names agree with the existing involute() and conj() wrappers (they're aliases, no new Julia names needed).

Each new function has a delegation smoke test plus a property test where applicable.

New wrappers in mv.jl:
- undual()         — inverse of dual(); @test undual(dual(v)) == v
- mag2()           — grade-wise sum of |norm2|; differs from norm()^2 in non-Euclidean metrics
- mag()            — sqrt(mag2()); equals norm() only for Euclidean metrics
- shirokov_inverse() — inverse via arXiv:2005.04015 Theorem 4
- hitzer_inverse()   — efficient inverse for n<6 (Hitzer–Sangwine 2017)
- sp(A, B)           — (A*B).scalar(), distinct from A⊛B = (A*~B).scalar()

Also tests that g_invol() and ccon() (new names in 0.6.0) agree with
the existing involute() and conj() wrappers.

Closes #13
@lodyai lodyai bot force-pushed the feat/13-wrap-new-mv-methods branch from fead936 to 76d1b26 Compare April 3, 2026 10:28
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.64%. Comparing base (5b9a101) to head (76d1b26).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   80.43%   80.64%   +0.21%     
==========================================
  Files           4        4              
  Lines          92       93       +1     
==========================================
+ Hits           74       75       +1     
  Misses         18       18              

☔ 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.

Wrap new galgebra 0.6.0 Mv methods

1 participant