Add shirokov_inverse and hitzer_inverse#530
Conversation
|
I did a few tests on dim=3 and dim=4, but not on dim>=5 because the code was so slow. Happy about ideas on how to speed it up! Plus I think it would make sense to add unit tests for the inverse. |
|
For a first PR, dim 3 to 4 tests suffice. Slowness of GAlgebra above 4 dims are observed in other cases too. There are a few issues to explore the possibilities to speed up GAlgebra, but none is sufficiently mature. I'll take a look at the code ASAP. Thanks for the PR! ❤️ |
| Uk = self | ||
| for k in range(1, N): | ||
| Ck = (N / k) * Uk.scalar() | ||
| adjU = Ck - Uk |
There was a problem hiding this comment.
I can't immediately see why you negated it here and negated it back below.
There was a problem hiding this comment.
Thats not in line with the clifford code, but in line with the Shirokov paper. The variables adjU and Uk sometimes differ by a sign in the clifford code for some reason.
|
Looks correct and good to me (cross-checked with clifford and the papers), except for one comment. Can you add your tests for dim 3-4 as tests in CI? It's fine to add them as notebooks or vanilla tests. |
Doing the hitzer ops recursively, rather than greedily forming the product of all involutions, can be much faster. When working recursively the number of components tends to drop dramatically at each step. |
Groups new entries by: features, bug fixes, examples/docs, tests/maintenance. Features: Cl() kingdon interface (pygae#550, closes pygae#524), Mv.__rtruediv__ (pygae#543, closes pygae#512), shirokov_inverse/hitzer_inverse (pygae#530). Bugs: interop dual mode contamination (pygae#556, closes pygae#555), norm() Abs wrapping (pygae#554, closes pygae#522), is_versor() improvement (pygae#536, closes pygae#533). Examples/docs: sundial + cheatsheet tests (pygae#549+pygae#557, closes pygae#506), coords tutorial (pygae#551), README ops (pygae#548, closes pygae#523). Tests/maintenance: lt.matrix() regression tests (pygae#558, closes pygae#461), extra-cdot regression test (pygae#545), er_blade + ReciprocalFrame refactors (pygae#552+pygae#553), CI fix (pygae#535).
* docs: add 0.6.0 changelog entries Groups new entries by: features, bug fixes, examples/docs, tests/maintenance. Features: Cl() kingdon interface (#550, closes #524), Mv.__rtruediv__ (#543, closes #512), shirokov_inverse/hitzer_inverse (#530). Bugs: interop dual mode contamination (#556, closes #555), norm() Abs wrapping (#554, closes #522), is_versor() improvement (#536, closes #533). Examples/docs: sundial + cheatsheet tests (#549+#557, closes #506), coords tutorial (#551), README ops (#548, closes #523). Tests/maintenance: lt.matrix() regression tests (#558, closes #461), extra-cdot regression test (#545), er_blade + ReciprocalFrame refactors (#552+#553), CI fix (#535). * docs: add missing issue link for #551 entry * docs: add changelog entry for #560 (Lt callable zero fix) * docs: move Lt zero fix into bug group, use issue #540 as reference
* docs: add 0.6.0 changelog entries Groups new entries by: features, bug fixes, examples/docs, tests/maintenance. Features: Cl() kingdon interface (pygae#550, closes pygae#524), Mv.__rtruediv__ (pygae#543, closes pygae#512), shirokov_inverse/hitzer_inverse (pygae#530). Bugs: interop dual mode contamination (pygae#556, closes pygae#555), norm() Abs wrapping (pygae#554, closes pygae#522), is_versor() improvement (pygae#536, closes pygae#533). Examples/docs: sundial + cheatsheet tests (pygae#549+pygae#557, closes pygae#506), coords tutorial (pygae#551), README ops (pygae#548, closes pygae#523). Tests/maintenance: lt.matrix() regression tests (pygae#558, closes pygae#461), extra-cdot regression test (pygae#545), er_blade + ReciprocalFrame refactors (pygae#552+pygae#553), CI fix (pygae#535). * docs: add missing issue link for pygae#551 entry * docs: add changelog entry for pygae#560 (Lt callable zero fix) * docs: move Lt zero fix into bug group, use issue pygae#540 as reference
Add
shirokov_inverseandhitzer_inversefunctions, based on thecliffordpackage implementation of the shirokov_inverse and hitzer_inverse.closes #529