SVDMethodIQRSVD.cpp
Go to the documentation of this file.
1 #include "methods.h"
2 
3 #include "IQRSVD/ImplicitQRSVD.h"
4 
18 using namespace JIXIE;
19 
21 {
22  Matrix3 U,V;
23  Vector3 S;
24 
25  singularValueDecomposition(R,U,S,V);
26 
27  if (S(0)*S(1)*S(2)<0)
28  {
29  Matrix3 D = Matrix3::Identity(3,3);
30  D(2,2) = -1;
31  X = U*D*V.transpose();
32  }
33  else
34  X = U*V.transpose();
35 }