File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ void dampedInverse( const JacobiSVD <dg::Matrix>& svd,
55
55
ArrayWrapper<const SV_t> sigmas (svd.singularValues ());
56
56
57
57
SV_t sv_inv (sigmas / (sigmas.cwiseAbs2 () + threshold * threshold));
58
- const dg::Matrix::Index m = std::min (svd. rows (), svd. cols () );
58
+ const dg::Matrix::Index m = sv_inv. size ( );
59
59
60
60
_inverseMatrix.noalias () =
61
- ( svd.matrixV ().rightCols (m) * sv_inv.asDiagonal () * svd.matrixU ().rightCols (m).transpose ());
61
+ ( svd.matrixV ().leftCols (m) * sv_inv.asDiagonal () * svd.matrixU ().leftCols (m).transpose ());
62
62
}
63
63
64
64
void dampedInverse ( const dg::Matrix& _inputMatrix,
@@ -86,7 +86,7 @@ void dampedInverse( const dg::Matrix& _inputMatrix,
86
86
sotDEBUGIN (15 );
87
87
sotDEBUG (5 ) << " Input Matrix: " <<_inputMatrix<<std::endl;
88
88
89
- JacobiSVD<dg::Matrix> svd (_inputMatrix, ComputeThinU | ComputeThinV );
89
+ JacobiSVD<dg::Matrix> svd (_inputMatrix, ComputeThinU | ComputeFullV );
90
90
dampedInverse (svd, _inverseMatrix, threshold);
91
91
92
92
sotDEBUGOUT (15 );
You can’t perform that action at this time.
0 commit comments