236
2011-03-25 15:05:27 +0000
qr_colpivoting_3 fails sometimes for rank 1 matrices.
2019-12-04 10:35:11 +0000
1
1
1
Unclassified
Eigen
QR
3.0
All
All
NEW
---
Unknown
---
1
gael.guennebaud
eigen.nobody
oldest_to_newest
973
0
gael.guennebaud
2011-03-25 15:05:27 +0000
Seed to reproduce: s1301044630
The problem happens when testing the rank of a rank 1 matrix. In ColPivHouseholderQR::rank(), line 202, there is like a factor 2 or 3 between premultiplied_threshold and the and the second biggest pivot which are both 1e-16 times smaller than the biggest. So nothing serious.
Nevertheless, if in the creation of a rank-one matrix (test/main.h, line 423), I remove the normalized(), then the "probably wrong negatives" go away.
974
1
gael.guennebaud
2011-03-25 16:01:45 +0000
For the record, reflapack or mkl does no fails on this particular seed, but they fails on other matrices, e.g. with a rank 2 while Eigen passes. So I'd say even.
Here is the piece of code to call LAPACK from ColPivHouseholderQR (for complexes):
int M = rows;
int N = cols;
int LDA = rows;
int INFO = 0;
VectorXd rwork(2*cols);
VectorXi jpvt(cols);
jpvt.setZero();
m_qr = matrix;
zgeqpf_( &M, &N, &m_qr.real().coeffRef(0,0), &LDA, jpvt.data(), &m_hCoeffs.real().coeffRef(0), &m_temp.real().coeffRef(0), rwork.data(), &INFO);
m_maxpivot = internal::real(m_qr(0,0));
m_nonzero_pivots = 0;
for(Index k = 0; k < size; ++k)
if(m_qr(k,k)!=Scalar(0))
m_nonzero_pivots++;
m_colsTranspositions = jpvt.cast<typename IntRowVectorType::Index>().array() - 1;
m_colsPermutation.setIdentity(cols);
for(Index k = 0; k < m_nonzero_pivots; ++k)
m_colsPermutation.applyTranspositionOnTheRight(k, m_colsTranspositions.coeff(k));
m_isInitialized = true;
return *this;
8680
2
eigen.nobody
2019-12-04 10:35:11 +0000
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/236.