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 45D9665A0 for ; Wed, 13 Jul 2011 16:05:10 +0000 (UTC) Received: (qmail 32851 invoked by uid 500); 13 Jul 2011 16:05:09 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 32766 invoked by uid 500); 13 Jul 2011 16:05:09 -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 32758 invoked by uid 99); 13 Jul 2011 16:05:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 16:05:09 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of phil.steitz@gmail.com designates 74.125.83.171 as permitted sender) Received: from [74.125.83.171] (HELO mail-pv0-f171.google.com) (74.125.83.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 16:04:59 +0000 Received: by pva4 with SMTP id 4so5049937pva.30 for ; Wed, 13 Jul 2011 09:04:38 -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=xxGSbPtFB6NZpWSNapZvQwgbb7rjrsYWO2PbaFfGP/s=; b=sgC4X322AOp9vxKpIqMz5OOYe1H86uGcn9ZdrevB4GBBSVt4y2LqAi+yRuDdMRDkDX lcAn13L1Ha1UkQ1kZAXDrds9O3i/FMu50V+S0LsOTDw9H6C2y2HOrX2YPtsxTabt56WV wDJrVgSMeIq2JIqttnsoD4gw6BgdsQa+mGQhQ= Received: by 10.143.165.2 with SMTP id s2mr539868wfo.417.1310573078533; Wed, 13 Jul 2011 09:04:38 -0700 (PDT) Received: from a.local (71-223-74-208.phnx.qwest.net [71.223.74.208]) by mx.google.com with ESMTPS id e13sm9924580wfd.1.2011.07.13.09.04.37 (version=SSLv3 cipher=OTHER); Wed, 13 Jul 2011 09:04:37 -0700 (PDT) Message-ID: <4E1DC214.4010103@gmail.com> Date: Wed, 13 Jul 2011 09:04:36 -0700 From: Phil Steitz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Commons Developers List Subject: Re: [math] RealLinearOperator and AbstractRealMatrix References: <20110712191202.0F81414045561@svoboda.polytechnique.org> <20110713151958.GD3310@dusk.harfang.homelinux.org> In-Reply-To: <20110713151958.GD3310@dusk.harfang.homelinux.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 7/13/11 8:19 AM, Gilles Sadowski wrote: > Hi. > >> [...] >> Before I commit new code (Conjugate gradient, SYMMLQ, etc...), I'll open a new >> JIRA ticket for having AbstractRealMatrix inherit from RealLinearOperator, if >> that's OK with everyone. > Currently this is not possible because the > getRowDimension > getColumnDimension > are declared "final" in "RealLinearOperator" but are "abstract" in > "AbstractRealMatrix". > > So there are 2 questions, one for you and the other for the designer(s) of > "AbstractRealMatrix" and its subclasses: > > 1. Do you think that the two methods must be "final"? > 2. Why were the row and column dimensions stored in each subclass and not in > the parent class? So they do not necessarily have to be "stored" at all - i.e., some representations may wish to compute these values (as most current impls do. See, e.g. the array-based real matrices. The row and column dimensions are not stored as instance data in these classes.) Forcing every impl to maintain them does not sound good, especially since there are no setters and the fields are private in the parent. Definitely better to either imitate the setup in AbstractRealMatrix (dispense with the fields and define abstract getters) or make the getXxDimension methods either abstract or at least non-final. My recommendation would be to follow the model of AbstractRealMatrix: a) no instance fields for dimensions b) abstract dimension getters c) protected constructor that just checks positivity. Phil > >> Because MATH-581 got a bit messy, I'll also open a new one specifically with >> these new classes (again, if that suits you). > I don't think that it's necessary; better keep everything in the same place > and resolve the issue when the functionality is working as intended. > >> Also, I'd like to have your feeling on MATH-613, so that I can submit the >> corresponding code (which would in turn lead to a more compact CG/SYMMLQ...). > Let's go with "combine" and "combineToSelf" first. > I like the "functional" generalization but it can be added later (as "map" > and "mapToSelf"). > > > Regards, > Gilles > > --------------------------------------------------------------------- > 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