-
Notifications
You must be signed in to change notification settings - Fork 62
Simplify the basis interface #115
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
Conversation
Thanks, this approach should work I think. We could also rename |
I have to rework Bundle and Product and such, that's why I waited for some feedback – thanks. I think you get a basis anyways – so |
As far as I can see
I don't see where the ad-hoc basis generation is the default. I was trying to make it so full basis generation doesn't happen unless the user specifically asks for it. |
Oh that's what I meant with "ad-hoc", to avoid full basis generation. If you have a basis already stored, the user might just use that one. I will take care that that's the case and documented, then. |
… correctly and how to trigger the right show methods.
I finished a few tasks today, the next thing – and that might require some internal tricks – is representing cached bases on product manifolds – I will try to understand the old approach and mimick that within the new structure. but for the base manifolds everything should already work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks quite nice 👍 .
Co-Authored-By: Mateusz Baran <[email protected]>
I am quite stuck on Product and Power to unify my cached approach. It seems I am missing something and I mainly do not understand how the old storage worked. I am missing My idea is to basically store a tuple of cached bases and return the old style representation of |
What do you mean by missing the length of your data? ONBs for the power manifold, for example, work by storing a basis for for each particular component. For example if you have an SPD-valued image, we have a separate basis at each point stored. That's what
Yes, that's what old style cached ONBs for product manifold do.
What do you mean by this? |
Yes, the idea is clear, just the realisation/implementation – I can't get that to work. I tried to do the same approach as the original For example calling |
Unfortunately both power and product manifolds are quite complicated, yes. I was focusing on performance and versatility so the code is not that simple. Some things like
I'm not really sure where the problem may be, the rework should just be about replacing the struct with cached basis with another? I'll take a closer look what's wrong here during the weekend. So push whatever you feel like and I'll see what's wrong with it. |
Thanks for taking a look. Yes, I am not saying, you should've documented it directly; of course first it should work and be performant :) I am just stuck and don't know what's going wrong, since I mainly tried to follow your approaches, even storing in And well – |
I got a small step further, but somehow sometimes I don't understand that the edfit: Ah its the zero eigenvalue direction of the diagonalising basis – I will check tomorrow afternoon. But the first two bases seem to work. |
Taking a break was a good idea.
|
# Conflicts: # src/Manifolds.jl # test/utils.jl
… be clear that this is _some_ basis and not a specific one (like the DiagonalizingOrthonormalBasis) and its specifically not Abstract for example.
…t should be clear that this is _some_ basis and not a specific one (like the DiagonalizingOrthonormalBasis) and its specifically not Abstract for example." This reverts commit 77ddb42.
Codecov Report
@@ Coverage Diff @@
## master #115 +/- ##
=======================================
Coverage 96.87% 96.87%
=======================================
Files 49 49
Lines 3229 3229
=======================================
Hits 3128 3128
Misses 101 101 Continue to review full report at Codecov.
|
…aiting for feedback on the mutating versions.
…folds.jl into basis-simplification
…folds.jl into basis-simplification
I just finished group manifolds (especially identity and) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks OK now.
So let's wait for tests and then we can merge. |
This is a sketch for now and aims to simplify the basis type. What this aims to do is the following
We have several types that mark what type of a basis we want
ArbitraryBasis
ArbitraryOrthonormalBasis
DiagonalizingOrthonormalBasis
all of this are
<: ArbitraryBasis
and for each we previously had a Precomputed basis type. This PR aims to provide just one
CachedBasis <: ArbitraryBasis
, that is internally typed by an arbitrary basis itself and has just one field for stored data. It usually stores just the vectors. For the last type it also stores the direction and the eigenvalues in a seperate type.I am not yet done with all rework, but I hope this avoid the double-types (T and PrecomputedT) for all basis types. This is not an urgent PR, but I will work on this, when I have time and the current other PRs are finished.