Bugzilla – Attachment 577 Details for
Bug 1014
Eigenvalues 3x3 matrix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Make direct eigenvalue computation of 3x3 matrices more stable by shifting the eigenvalues
bug1014.patch (text/plain), 922 bytes, created by
Christoph Hertzberg
on 2015-05-11 15:28:09 UTC
(
hide
)
Description:
Make direct eigenvalue computation of 3x3 matrices more stable by shifting the eigenvalues
Filename:
MIME Type:
Creator:
Christoph Hertzberg
Created:
2015-05-11 15:28:09 UTC
Size:
922 bytes
patch
obsolete
>diff --git a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h >--- a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h >+++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h >@@ -601,8 +601,10 @@ > VectorType& eivals = solver.m_eivalues; > > // map the matrix coefficients to [-1:1] to avoid over- and underflow. >- Scalar scale = mat.cwiseAbs().maxCoeff(); >- MatrixType scaledMat = mat / scale; >+ Scalar traceBy3 = mat.trace()/Scalar(3); >+ MatrixType scaledMat = mat - traceBy3*MatrixType::Identity(); >+ Scalar scale = scaledMat.cwiseAbs().maxCoeff(); >+ if(scale > 0) scaledMat /= scale; > > // compute the eigenvalues > computeRoots(scaledMat,eivals); >@@ -710,6 +712,7 @@ > } > // Rescale back to the original size. > eivals *= scale; >+ eivals.array() += traceBy3; > > solver.m_info = Success; > solver.m_isInitialized = true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1014
:
575
|
576
|
577
|
578
|
579
|
580