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

Basis number system swap #754

Merged
merged 6 commits into from
Oct 4, 2024
Merged

Basis number system swap #754

merged 6 commits into from
Oct 4, 2024

Conversation

mateuszbaran
Copy link
Member

@mateuszbaran mateuszbaran commented Oct 1, 2024

  • Adapt Euclidean
  • Adapt ProjectiveSpace (I'm not sure the old code is even correct for real basis of complex projective space?)
  • Adapt SymmetricMatrices
  • Adapt quaternionic unitary matrices?

@mateuszbaran mateuszbaran added the WIP Work in Progress (for a pull request) label Oct 1, 2024
@mateuszbaran
Copy link
Member Author

I've made the tests for ProjectiveSpace pass but I haven't verified if the code is indeed correct (it's just the same logic as on master). Notably, sphere only has the real coefficient basis.

@kellertuer
Copy link
Member

I am also not sure the old Euclidean code was correct. But then we should check that. Just that today I am busy (a bit behind with my lecture for tomorrow, and a bit of grading). So I'll probably only tomorrow have time to take a look.

@mateuszbaran
Copy link
Member Author

I haven't found any issues with Euclidean -- do you have a specific concern? Anyway, this can wait until tomorrow :).

@kellertuer
Copy link
Member

The original example

using Revise
using Manifolds, ManifoldDiff, RecursiveArrayTools, FiniteDifferences

r_backend = ManifoldDiff.TangentDiffBackend(
    ManifoldDiff.FiniteDifferencesBackend()
)

f(p) = 1
grad_f(M,p) = ManifoldDiff.gradient(M, f, p, r_backend)
M = ℂ^3 × PowerManifold(Rotations(6), NestedPowerRepresentation(),3)
p = rand(M)
# causes the same error
grad_f(M,p)

also threw errors in Euclidean, but I have to check whether your fix in ManifoldsBase already fixed that then.

@mateuszbaran
Copy link
Member Author

No, that wasn't a problem with Euclidean but thanks for reminding me -- there was another issue in a different place that I had to fix to make the example work.

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.68%. Comparing base (150e7e0) to head (4b24118).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #754      +/-   ##
==========================================
- Coverage   99.69%   99.68%   -0.01%     
==========================================
  Files         123      123              
  Lines       11418    11444      +26     
==========================================
+ Hits        11383    11408      +25     
- Misses         35       36       +1     

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

@mateuszbaran mateuszbaran added Ready-for-Review A label for pull requests that are feature-ready preview docs Add this label if you want to see a PR-preview of the documentation and removed WIP Work in Progress (for a pull request) labels Oct 4, 2024
Copy link
Member

@kellertuer kellertuer left a comment

Choose a reason for hiding this comment

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

This looks good to me, if code coverage agrees of course.

@mateuszbaran mateuszbaran changed the title WIP: Basis number system swap Basis number system swap Oct 4, 2024
@mateuszbaran mateuszbaran merged commit 029b766 into master Oct 4, 2024
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview docs Add this label if you want to see a PR-preview of the documentation Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants