[eigen] Precision in Cholesky Decomposition

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I was having a problem with a Cholesky decomposition failing with the
indication that the matrix was not positive definite.  I was surprised
because I was able to successfully perform the Cholesky decomposition
in MATLAB.  I tracked this down to the value returned by
precision<double>() as defined in src/Core/MathFunctions.h, the square
root of which is being used as the cut-off for numerically equivalent
to zero in the LLT code.  The return value is hard-coded to 1e-11; I
was able to match MATLAB by setting this to 1e-18 instead.

Is there a particular reason 1e-11 was chosen for this value?  Would
it make sense to go with a smaller value by default, or at least offer
the ability to configure this number as part of the LLT interface?  Or
is there a better way for me to solve this problem? (Maybe some kind
of scaling before the decomposition, then rescaling when I'm done?)

Thanks,

Scott



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/