Bugzilla – Attachment 445 Details for
Bug 774
umeyama sometimes returns a reflection
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]
Patch to umeyama to address reflection bug
umeyama-reflection-bug.patch (text/plain), 1.07 KB, created by
Charles Karney
on 2014-03-27 20:34:40 UTC
(
hide
)
Description:
Patch to umeyama to address reflection bug
Filename:
MIME Type:
Creator:
Charles Karney
Created:
2014-03-27 20:34:40 UTC
Size:
1.07 KB
patch
obsolete
>--- Umeyama.h.orig 2014-02-26 10:35:18.000000000 -0500 >+++ Umeyama.h 2014-03-27 15:12:25.767370970 -0400 >@@ -136,22 +136,13 @@ > > // Eq. (39) > VectorType S = VectorType::Ones(m); >- if (sigma.determinant()<0) S(m-1) = -1; > > // Eq. (40) and (43) >- const VectorType& d = svd.singularValues(); >- Index rank = 0; for (Index i=0; i<m; ++i) if (!internal::isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank; >- if (rank == m-1) { >- if ( svd.matrixU().determinant() * svd.matrixV().determinant() > 0 ) { >- Rt.block(0,0,m,m).noalias() = svd.matrixU()*svd.matrixV().transpose(); >- } else { >- const Scalar s = S(m-1); S(m-1) = -1; >- Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose(); >- S(m-1) = s; >- } >- } else { >- Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose(); >- } >+ if ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 ) >+ S(m-1) = -1; >+ >+ Rt.block(0,0,m,m).noalias() = >+ svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose(); > > if (with_scaling) > {
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 774
: 445