Re: [eigen] Positive Definitenes?

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


2010/3/3 Cyril Flaig <cflaig@xxxxxxxxxxx>:
> On 2010-03-02 19:27, Benoit Jacob wrote:
>> 2010/3/2 Cyril Flaig <cflaig@xxxxxxxxxxx>:
>>> The Cholesky decomposition works only if the matrix is positive
>>> definite. If the decomposition fails then eigen sets a
>>> m_isPositiveDefinite to false, doesn't it?
>>>
>>> Or is this deprecated and not used in the new version?
>>
>> This is deprecated indeed.
>
> As far as I know. The fastest way to determine the postive definitnes is
> to check the diagonal if all entries are >=0.

This is indeed a necessary condition for positiveness.

> If this is true then
> attempt a Cholesky decomposition. If it exists then the matrix is
> positive definite.

The problem with this approach is that it's an all-or-nothing test
that one has to perform at the time of the decomposition itself.
Making this useful in practice would require us to let the user pass a
choice of a threshold at the time of the decomposition itself (so an
API change) and even then, that would be pretty bad as, if the user
passes a higher threshold, he compromises the accuracy of a subsequent
solve(). So this forces a compromise between the invertibility check
and the precision of solve().

Benoit

>
> -cyril
>
>



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