[eigen] solve with and without check |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: [eigen] solve with and without check*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Mon, 24 Aug 2009 14:00:53 -0400*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=4uH7qA9aR1fAPqyDq0RIzSpjVZagfalyp6TgBu6+dzQ=; b=fvAsBfhL0PxkYGSRyRKq8Rnc/q0I0tfDSEV2wcALwGvpXINdIMqI4gY/YjbOH5X4Z1 1Y58iKaKp1OYA2ZNqqcD/FAkbLswQuPyU05vVnZzrvRXmhbGICuPCPxeSDYGPlNIwq1H P2OeQ8mpyZJOmBqTEf4SHc4EBWPUxamt998s4=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=hP1buMYHmzq9qovZIOQx4vZa+jYEPq7+gGdaJuyDGNMTggcViyeeMIdhUSjO8wjyTW 9scmaT1skVWVxcQw3wpK/EhVIUy/h9iy389UB62DXHNbMXGFndPGpSBgIW3pzE7qS155 foqK8FOo91xgZrWpl1v/uKKGukxupMn8V87yE=

Hi, In various decompositions (LU, rank-revealing QR,...) we have a solve() method that checks for the existence of a solution; if no solution exists, it returns false and leaves the result undefined. This is really needed as trying to get a solution nevertheless can result in inf/nan values making the solve() function taking much longer to return. But in most cases, the user just knows that a solution is meant to exist and he wants to get a solution even if it's only half-decent, rather than having to check the return value of solve() and deal with error cases. This is especially true as it's very difficult to check for existence without paying a very high price, basically our triangular solvers do not do any check (required, i guess, to make them fast) so the check we do is rather fragile. This also isn't addressed by letting the user set manually the precision level: the solve() method would need a separate precision level than the compute() method, this is very cumbersome. --> i propose the following change: in all decompositions that have a solve() checking for existence, let's rename solve() to solveWithCheck() (or whatever native English speakers prefer... perhaps trySolve() ? checkSolve() ? ) then let's add a method solve() that doesn't do any check, making it the responsibility of the caller that a decent solution exists. Cheers, Benoit

**Follow-Ups**:**[eigen] Re: solve with and without check***From:*Benoit Jacob

**Re: [eigen] solve with and without check***From:*Andrea Arteaga

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] TriangularView::solve() interface** - Next by Date:
**[eigen] Re: solve with and without check** - Previous by thread:
**Re: [eigen] TriangularView::solve() interface** - Next by thread:
**[eigen] Re: solve with and without check**

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