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 B465F756E for ; Sun, 2 Oct 2011 06:32:54 +0000 (UTC) Received: (qmail 89167 invoked by uid 500); 2 Oct 2011 06:32:53 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 89094 invoked by uid 500); 2 Oct 2011 06:32:53 -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 89058 invoked by uid 99); 2 Oct 2011 06:32:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 06:32:51 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,GAPPY_SUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebastien.brisard@gmail.com designates 209.85.212.43 as permitted sender) Received: from [209.85.212.43] (HELO mail-vw0-f43.google.com) (209.85.212.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Oct 2011 06:32:44 +0000 Received: by vws13 with SMTP id 13so3009317vws.30 for ; Sat, 01 Oct 2011 23:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=8tkNIw4Gw8p0XEe+bJZOmGFenP2/hybxw17KfpvcQF0=; b=PbLPQzj0h9hhcaTQRzsmGYawiiOhojceRX1dNbuRcvDiM+uO/Jkgg+aR9fwYtemkN/ VJMUUea8CN/m8Wt5albcKmrCEJBCD/e+93EfulxG88t1xLO01JnHa01Rs7sp4+XVZJGy wLFYeExh/No93nXVDkLBSl98xoNN/N83bqC7s= MIME-Version: 1.0 Received: by 10.52.116.241 with SMTP id jz17mr13254211vdb.181.1317537143259; Sat, 01 Oct 2011 23:32:23 -0700 (PDT) Sender: sebastien.brisard@gmail.com Received: by 10.52.183.129 with HTTP; Sat, 1 Oct 2011 23:32:23 -0700 (PDT) In-Reply-To: <4E87FDA1.5000409@gmail.com> References: <4E877BB0.7020803@gmail.com> <4E87FDA1.5000409@gmail.com> Date: Sun, 2 Oct 2011 08:32:23 +0200 X-Google-Sender-Auth: Yo8YiQt4X2EwZ97w6CkM4Msh4AM Message-ID: Subject: Re: [math] rename o.a.c.m.linear.SingularMatrixException to SingularLinearOperatorException From: =?ISO-8859-1?Q?S=E9bastien_Brisard?= To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org OK Phil, I'm just worried about naming consistency. So should I drop "Linear" everywhere? Only in exception names (where I agree, it's not that important)? Thanks, S=E9bastien 2011/10/2 Phil Steitz : > On 10/1/11 9:42 PM, S=E9bastien Brisard wrote: >> My mistake! I was convinced we already had >> =A0 - NonPositiveDefiniteMatrixException extends >> NonPositiveDefiniteLinearOperatorException >> =A0 - NonSymmetricMatrixException extends NonSelfAdjointLinearOperatorEx= ception >> =A0 - NonSquareMatrixException extends NonSquareLinearOperatorException >> but looking at the javadoc, this is not the case. So I agree, your >> third option would be the simplest. >> >> As for shortening the name, I'm all for it. For consistency, I would >> do it for every class matching the pattern *LinearOperator* if you all >> agree. Also, I think that "linear" is as important as "operator" in >> "LinearOperator" (even if lilnearity might seem an obvious feature, >> provided all the classes we are discussing are actually located in the >> linear package). So what do you think of LinOp as a compromise? >> Something like RealLinOp instead of RealLinearOperator, >> NonSquareLinOpException, etc... > > I like full words. =A0 I don't know about "linear" vs "operator" in > "LinearOperator" but I think the "linear" can safely be dropped in > "SingularLinearOperator." > > Phil >> >> S=E9bastien >> >> 2011/10/1 Phil Steitz : >>> On 10/1/11 1:21 AM, S=E9bastien Brisard wrote: >>>> Hello, >>>> I need to be able to throw an exception when an iterative linear >>>> solver detects that a RealLinearOperator is singular. I would propose >>>> to implement a SingularLinearOperatorException. Then, since RealMatrix >>>> is derived from RealLinearOperator, it would be logical to have >>>> SingularMatrixException inherit from SingularLinearOperatorException. >>>> However, looking at the present impl of SingularMatrixException, this >>>> exception does nothing fancy. So having two different exceptions might >>>> be too much, I don't know. >>>> So here are two proposals >>>> 1. Rename SingularMatrixException to SingularLinearOperatorException >>>> 2. Create SingularLinearOperatorException, and have >>>> SingularMatrixException extend SingularLinearOperatorException. >>>> >>>> Which option (or any other) do you favor? >>> I would keep it simple and just have the two exceptions >>> independent. =A0The reason for this is that the activation contexts >>> are likely to not often have much in common - i.e., as we have >>> discussed before, a singular matrix exception will be triggered when >>> a matrix that is not supposed to be singular is numerically singular >>> (usually with some kind of threshold) while a singular operator >>> exception is going to be triggered when an operator acts >>> singularly. =A0Of course, if the operator is represented by a matrix, >>> then the specialization makes sense; but this will not always be the >>> case, so there is not going to be meaningful state or implementation >>> inheritance. =A0Therefore I don't see much value in the inheritance >>> (think about the value of catching the superclass or inheritance of >>> state or implementation in the exceptions themselves). =A0I would also >>> shorten the name to SingularOperatorException. >>> >>> Phil >>>> S=E9bastien >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>>> For additional commands, e-mail: dev-help@commons.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >>> For additional commands, e-mail: dev-help@commons.apache.org >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org