Re: [eigen] Householder.h: ::min() and operator<= |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
On 2016-09-08 18:04, Peter wrote:
But that's asking for trouble. Wasn't the idea of
NumTraits<TpFloat>::epsilon() to provide this information?
NumTraits::epsilon() is too large in this case -- as you pointed out,
this is to prevent underflows when calculating beta.
The related bug is here:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1017
I guess it would be slightly better, if we provided something like a
NumTraits::smallest(), ourselves.
line 80: if(tailSqNorm <= tol && numext::abs2(numext::imag(c0))<=tol)
I have a little problem with the '<=' operator here. Here it used to
measure the difference from zero,
more precisely, whether it is safe to divide by beta later. This could
be a problem for user defined types
which consist of tuples of arithmetic types, e.g. {z1, z2}. Ordering
them by first by z1, and if that component agrees
with the then one orders by z2 will conflict with the intention of line 80,
in case it is safe to divide by { 0, z2>epsilon }.
Not sure exactly what you are doing with the "tuple of arithmetic
types". Is it some kind of interval algebra?
In that specific case operator<= should be interpreted as "could be
smaller or equal".
Would it help for you, if we replaced the condition by this:
!(tailSqNorm > tol) && !(.... > tol)
However I have no simple suggestion to that, and maybe it's a too
constructed example.
Yes, it is a bit difficult to make our decompositions robust to
arbitrary self-defined types.
We gave some opportunity for customization for pivoting LU
decompositions, though (i.e., if your use case is somewhat reasonable,
we may consider giving some customization opportunity here as well).
Out of curiosity, is there an advantage of using householder for a 2x2
matrix, as Eigen::SelfAdjointEigenSolver does,
instead of just performing a Jacobi rotation?
Usually, you should use SelfAdjointEigenSolver::computeDirect for 2x2
(and 3x3) matrices. We could make runtime checks for n==2 and n==3, but
especially the 3x3 method might be a tiny bit less accurate than the
Householder based method.
Cheers,
Christoph
--
Dipl. Inf., Dipl. Math. Christoph Hertzberg
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 1
28359 Bremen, Germany
Zentrale: +49 421 178 45-6611
Besuchsadresse der Nebengeschäftsstelle:
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4021
Empfang: +49 421 178 45-6600
Fax: +49 421 178 45-4150
E-Mail: chtz@xxxxxxxxxxxxxxxxxxxxxxxx
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik