Registered Member
|
how to set tolerance before QR decomposition
seems impossible: RealScalar threshold_helper = m_colSqNorms.maxCoeff() * internal::abs2(NumTraits<Scalar>::epsilon()) / RealScalar(rows); |
Moderator
|
you mean that qr.setThreshold(XXX) does not work? if so then please fill a bug report: http://eigen.tuxfamily.org/bz
|
Registered Member
|
I mean changing tol beforeI have a qr instance, becase I found in the constructor of ColPivHouseholderQR, the threshold was not used to determin non-zero pivots. |
Moderator
|
ColPivHouseholderQR<MyMatrixType> qr;
qr.setThreshold(....); qr.compute(mat); ... |
Registered Member
|
but in the compute(), m_nonzero_pivots is determined by the default tol, NumTraits<Scalar>::epsilon(), so when I called solve(), the nonzeroPivots() will be called to determine the efficent rank, thus, also I cannot control the tol when using solve(), thanks |
Registered Member
|
You can check the following codes, result was strange.
matrix x: 0.8147 0.8147 0.1576 0.9058 0.9058 0.9706 0.127 0.127 0.9572 0.9134 0.9134 0.4854 0.6324 0.6324 0.8003 vector y: 0.1712 0.706 0.0318 0.2769 0.0462 solution: -7.41133e+014 7.41133e+014 -0.301007 |
Moderator
|
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar