We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8fe09c commit be6851cCopy full SHA for be6851c
include/sot/core/matrix-svd.hh
@@ -55,9 +55,10 @@ void dampedInverse( const JacobiSVD <dg::Matrix>& svd,
55
ArrayWrapper<const SV_t> sigmas (svd.singularValues());
56
57
SV_t sv_inv (sigmas / (sigmas.cwiseAbs2() + threshold * threshold));
58
+ const dg::Matrix::Index m = std::min(svd.rows(), svd.cols());
59
60
_inverseMatrix.noalias() =
- ( svd.matrixV() * sv_inv.asDiagonal() * svd.matrixU().transpose());
61
+ ( svd.matrixV().rightCols(m) * sv_inv.asDiagonal() * svd.matrixU().rightCols(m).transpose());
62
}
63
64
void dampedInverse( const dg::Matrix& _inputMatrix,
0 commit comments