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 2A5F594A0 for ; Sat, 1 Oct 2011 20:45:05 +0000 (UTC) Received: (qmail 5499 invoked by uid 500); 1 Oct 2011 20:45:04 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 5380 invoked by uid 500); 1 Oct 2011 20:45:04 -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 5371 invoked by uid 99); 1 Oct 2011 20:45:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 20:45:04 +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 (athena.apache.org: domain of phil.steitz@gmail.com designates 209.85.210.41 as permitted sender) Received: from [209.85.210.41] (HELO mail-pz0-f41.google.com) (209.85.210.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 20:44:56 +0000 Received: by pzk5 with SMTP id 5so7715122pzk.0 for ; Sat, 01 Oct 2011 13:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=z6U3qU7ys6pvBSd9AOmzyQRL6VVCFcQ112/g6v1C+Es=; b=ANOUrZLmZvjWla6POJ67oW9MNS6hSDDKLGNAnbXyziRK7ZgcOZuOwhVS0OdoWMQUyn Z3x4bnKc9pvRxq6EjUHR/R/wc/lWp1uankhcpUCAhVnxoClnKHMNGNEeaULnxXmsCUzx hrjhRGKZ88gznRmrNHOIxit7dcbdq3kn3vELE= Received: by 10.68.71.193 with SMTP id x1mr67681341pbu.132.1317501876353; Sat, 01 Oct 2011 13:44:36 -0700 (PDT) Received: from [192.168.0.2] (71-223-64-240.phnx.qwest.net. [71.223.64.240]) by mx.google.com with ESMTPS id e7sm6018929pbq.1.2011.10.01.13.44.34 (version=SSLv3 cipher=OTHER); Sat, 01 Oct 2011 13:44:35 -0700 (PDT) Message-ID: <4E877BB0.7020803@gmail.com> Date: Sat, 01 Oct 2011 13:44:32 -0700 From: Phil Steitz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] rename o.a.c.m.linear.SingularMatrixException to SingularLinearOperatorException References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit On 10/1/11 1:21 AM, S�bastien 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. The 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. Of 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. Therefore 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). I would also shorten the name to SingularOperatorException. Phil > S�bastien > > --------------------------------------------------------------------- > 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