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

spatial/r3: add eigenvalue calculation for Mat type #1807

Open
soypat opened this issue May 23, 2022 · 2 comments
Open

spatial/r3: add eigenvalue calculation for Mat type #1807

soypat opened this issue May 23, 2022 · 2 comments

Comments

@soypat
Copy link
Contributor

soypat commented May 23, 2022

For symmetric 3x3 matrices:
https://dl.acm.org/doi/abs/10.1145/355578.366316

Singular Value decomp:
https://minds.wisconsin.edu/handle/1793/60736

I' be happy to contribute this feature.

@calebbuffa
Copy link

Agreed, this would be very helpful as I am currently creating my own solution.

@vladimir-ch
Copy link
Member

We already have mat.EigenSym, mat.Eigen and mat.SVD for computing these factorizations but I understand the appeal of having optimized versions for 3x3 matrices, so in principle I'm not against this request.

Some random thoughts:

How would the API look like? Would it follow what we have in mat?

In mat, we have some type safety to do symmetric eigendecomposition only for symmetric matrices. Would we need to introduce a SymMat in r3 or would there be a runtime check or something else?

Would the eigendecomposition compute also eigenvectors or only eigenvalues?

mat.SVD gives non-negative singular values while the method from the second reference may return the smallest singular value as negative (to allow U and V be pure rotations). Are we fine with this inconsistency?

How robust are these formulas/algorithms to weird/bad matrices or do they trade it for performance? Good tests would be needed as part of the implementation.

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

No branches or pull requests

3 participants