mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-16 19:33:14 +08:00
reduce epsilon in QR
This commit is contained in:
parent
cf0857c44d
commit
8e0ec3c62b
@ -185,6 +185,7 @@ void QR<MatrixType>::_compute(const MatrixType& matrix)
|
|||||||
m_qr = matrix;
|
m_qr = matrix;
|
||||||
int rows = matrix.rows();
|
int rows = matrix.rows();
|
||||||
int cols = matrix.cols();
|
int cols = matrix.cols();
|
||||||
|
RealScalar eps2 = precision<RealScalar>()*precision<RealScalar>();
|
||||||
|
|
||||||
for (int k = 0; k < cols; ++k)
|
for (int k = 0; k < cols; ++k)
|
||||||
{
|
{
|
||||||
@ -209,7 +210,8 @@ void QR<MatrixType>::_compute(const MatrixType& matrix)
|
|||||||
m_hCoeffs.coeffRef(k) = 0;
|
m_hCoeffs.coeffRef(k) = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( (!ei_isMuchSmallerThan(beta=m_qr.col(k).end(remainingSize-1).squaredNorm(),static_cast<Scalar>(1))) ) // FIXME what about ei_imag(v0) ??
|
else if ((beta=m_qr.col(k).end(remainingSize-1).squaredNorm())>eps2)
|
||||||
|
// FIXME what about ei_imag(v0) ??
|
||||||
{
|
{
|
||||||
// form k-th Householder vector
|
// form k-th Householder vector
|
||||||
beta = ei_sqrt(ei_abs2(v0)+beta);
|
beta = ei_sqrt(ei_abs2(v0)+beta);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user