Re: [eigen] solve with and without check |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] solve with and without check*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Mon, 24 Aug 2009 14:19:47 -0400*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 :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=LWoxhjkwq2AOSYKVjd7FGQ2SQufmk1f4/iX/PleMeGo=; b=S8INpyG5q1XC9jz0bBewDb9M+c1/Mr/F/Bynv03VTQf7TXc2CuAtgvM7/3gXcObQ/d jKCXyplRxXishUi9QIeUez7cmtdg7Wt2JMHt+EI47eoM484kkreh104SmyknA5mUaRX5 XYQ90pWKtqvFgnaocX/5v5g7B+V8V1/0Fapas=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=RSGTzngOlcIXGwbAztc/WZPeDwo6rhWiD/+ouInot4LfrsHnU/qHSL21U2IqTaBZNB qzwrPqLLdHUKfeAMJ+Cn0/ryMl4Ov+lkcMBhbih1vgS5/LAlbxHd/Muguv/Our1Oq//F 8rNFoJKoF1COQLERYdAIt2sqrL3/QuI5D8qM8=

2009/8/24 Andrea Arteaga <yo.eres@xxxxxxxxx>: >> --> 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. > > Or the opposite. > For example if one want to access to a matrix without control, has to use the coeff() or coeffRef() > methods, while the operator() (i.e. the primary choice) makes a control. In order to ensure the > consistency with the other parts of Eigen, the solve() method should make a control, while another > method (solveWithoutCheck() or whatever) should return the solution without performing the check. Here we have a bad case of conflicting principles: "The safest should be the default" versus "The most common should be the default" For operator() versus coeff(), it was an easy choice because in most cases the user wants the check, and can always disable it by disabling asserts. Here it's different, solveWithCheck is probably not the most common case. Let me stress the problem a bit more: the current solve isn't too reliable to determine when a solution exists. The cause of this problem is that our triangular solvers don't do that check. The reason why they don't is presumably that it would be costly for them to, but perhaps that's worth checking. Gael, could triangular solvers be extended to support 0's on the diagonal and detect inexistence of solutions ? Benoit

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

**References**:**[eigen] 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] solve with and without check** - Next by Date:
**Re: [eigen] solve with and without check** - Previous by thread:
**Re: [eigen] solve with and without check** - Next by thread:
**Re: [eigen] solve with and without check**

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