Re: [eigen] Positive Definitenes? |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Positive Definitenes?*From*: Gabriel <gabrielvc@xxxxxxxxx>*Date*: Thu, 4 Mar 2010 10:40:00 -0500*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=9GN6HRLzeZ7dSTQqcr5P4G/rWhohXZpMxILhA+R1P9w=; b=hPWVAyh9NEETUzckp5IaTevv6a/Z1DyGHDAgGSdtSHegsiywWh/6a1/MqJB4HrItSA ku2n7FA0Justx0zNkWd3y7YqMjr/1akDqH+cLqiaR9mpBNpHUI386aB0apPpt9M6I4pb QoQrQVEOA39PyDM7jzVcaZw1RlZ6fV32YiMKc=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=kjDtZzFdtXa9Mz/FLNg+WoKvM55DItrESaPv4wRtID6aoleKEq6x8t5FoDfzI+jTCe HxqgSwtpF9VHWj45xDPmWE8vlC/3K38Vi99Zi8XbHYkoe3L9qtGlb/Linu6w9bu/L18Q eMC9+iCg99msk6v7zWgVQ5ruqYRpseN7ciFe0=

Thanks for your answers, I will check the approaches to check for efficiency. This operation would have to be done several times, and I do need to solve a matrix equation K x = b, with K the matrix, and b a known vector, and this is done a lot of times.

Is there an error handler implemented? In my code this operation is performed hundreds of times and I would need to automatize some sort of workaround when the matrix is not positive definite. This would signal an error in my code, my matrices have to bee p.d. all the time, so I would implement something to forget the systems in which p.d. gets "lost".

Gabriel

On Wed, Mar 3, 2010 at 6:56 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:

2010/3/3 Cyril Flaig <cflaig@xxxxxxxxxxx>:

> On 2010-03-02 19:27, Benoit Jacob wrote:This is indeed a necessary condition for positiveness.

>> 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.

The problem with this approach is that it's an all-or-nothing test

> If this is true then

> attempt a Cholesky decomposition. If it exists then the matrix is

> positive definite.

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

>

>

--

==============

= Gabriel Villalobos,

= Candidato a Doctor en Ciencias - Física, UN

= M.Sc. Physics, Georgia Institute of Technology

= Físico, Universidad Nacional de Colombia

= Tel. Oficina. (571) 3165000 - 13031

= gvillalobosc@xxxxxxxxxxxxxx

= Enamoradamente Casado

===============

= Acuerdos Toltecas:

= * Hacer siempre y en todo asunto nuestro mejor

= esfuerzo,

= * Ser impecable con la palabra

= * No suponer

= * No tomarse nada a título personal

==============

**Follow-Ups**:**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**References**:**[eigen] Positive Definitenes?***From:*Gabriel

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Re: [eigen] Positive Definitenes?***From:*Cyril Flaig

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Re: [eigen] Positive Definitenes?***From:*Cyril Flaig

**Re: [eigen] Positive Definitenes?***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Eigen and rigid body simulation** - Next by Date:
**Re: [eigen] Positive Definitenes?** - Previous by thread:
**Re: [eigen] Positive Definitenes?** - Next by thread:
**Re: [eigen] Positive Definitenes?**

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