Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 263054BA0 for ; Wed, 11 May 2011 04:18:50 +0000 (UTC) Received: (qmail 13750 invoked by uid 500); 11 May 2011 04:18:49 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 13344 invoked by uid 500); 11 May 2011 04:18:49 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 13335 invoked by uid 99); 11 May 2011 04:18:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 04:18:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of SRS0=Ekq7=YB=m4x.org=sebastien.brisard@bounces.m4x.org designates 129.104.30.34 as permitted sender) Received: from [129.104.30.34] (HELO mx1.polytechnique.org) (129.104.30.34) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 04:18:38 +0000 Received: from new-host.home (ALagny-551-1-101-191.w92-141.abo.wanadoo.fr [92.141.100.191]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 1B1E514059823 for ; Wed, 11 May 2011 06:18:16 +0200 (CEST) Message-ID: <4DCA0E07.5040300@m4x.org> Date: Wed, 11 May 2011 06:18:15 +0200 From: =?UTF-8?B?U8OpYmFzdGllbiBCcmlzYXJk?= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] Exceptions for matrix operations References: <20110510151838.0292C14059823@svoboda.polytechnique.org> <804136DB-A75E-4094-996A-3A4E589A071A@gmail.com> <20110510220357.GD16459@dusk.harfang.homelinux.org> In-Reply-To: <20110510220357.GD16459@dusk.harfang.homelinux.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Wed May 11 06:18:16 2011 +0200 (CEST)) X-Org-Mail: sebastien.brisard.1997@polytechnique.org X-Old-Spam-Flag: No, tests=bogofilter, spamicity=0.009707, queueID=3FD4F1405982A Great! So we are more or less back to my initial proposition (see corresponding wiki). To sum up, we will define a new interface, called LinearOperator (should we make it RealLinearOperator? That would be consistent with the hierarchy AnyMatrix/RealMatrix), with the following methods LinearOperator +- void operate(double[] x, double[] y) +- int getDomainDimension() +- int getCodomainDimension() NOTA: I thought that operate(x, y) should *not* create the vector y = A.x, in order to avoid memory allocations for very large data sets. Is it a good idea? Regarding exceptions, we would have two new exceptions NonAdjointLinearOperator +- double[] getFirstOffendingVector() +- double[] getSecondOffendingVector() +- double getThreshold() NonPositiveDefiniteLinearMapException +- double[] getOffendingVector() +- double getThreshold() Since LinearOperator no longer extends AnyMatrix (or any daughter classes), I no longer feel the need to create a base exception from which NonAdjointLinearOperator and NonSymmetricMatrix would be derived. What do you think? Same goes to NonPositiveDefinite LinearMap/Matrix. Thanks for this very constructive discussion. I now need to work on my code before I can submit it. Best regards, Sebastien --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org