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 2E66A6B59 for ; Wed, 13 Jul 2011 16:31:29 +0000 (UTC) Received: (qmail 82235 invoked by uid 500); 13 Jul 2011 16:31:28 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 82158 invoked by uid 500); 13 Jul 2011 16:31:28 -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 82150 invoked by uid 99); 13 Jul 2011 16:31:27 -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:31:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ted.dunning@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 16:31:20 +0000 Received: by qwf6 with SMTP id 6so766098qwf.30 for ; Wed, 13 Jul 2011 09:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=iesgcvc2Jhc6y+er37kTWifH7tSF545LJsacpNH4umE=; b=U8FvekUDqLXPKDVV9xeEXhb2iG8eTpSsCrw3J0FOKzpQBs9nHvgWZhk9oS7Oj78gHX bOHwYTfsgtWa9FUm/xDfgtji228XxTmMz6iTA9XsYhZ11/dgCykeN1GmGMH/eNWVLGDr vRnw09eNiatJDBTCotaVIf6Q2r/UzrpYdZRiU= Received: by 10.224.95.74 with SMTP id c10mr1068536qan.258.1310574659231; Wed, 13 Jul 2011 09:30:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.47.135 with HTTP; Wed, 13 Jul 2011 09:30:39 -0700 (PDT) In-Reply-To: <4E1DC214.4010103@gmail.com> References: <20110712191202.0F81414045561@svoboda.polytechnique.org> <20110713151958.GD3310@dusk.harfang.homelinux.org> <4E1DC214.4010103@gmail.com> From: Ted Dunning Date: Wed, 13 Jul 2011 09:30:39 -0700 Message-ID: Subject: Re: [math] RealLinearOperator and AbstractRealMatrix To: Commons Developers List Content-Type: multipart/alternative; boundary=0016360e3b6203dead04a7f5f1a5 X-Virus-Checked: Checked by ClamAV on apache.org --0016360e3b6203dead04a7f5f1a5 Content-Type: text/plain; charset=UTF-8 Absolutely. And frankly, this makes huge since. A linear operator is a generalization of a matrix which should have *fewer* details than a matrix. Having implementation details of the linear operator dictate function of the matrix is perverse. Likewise, having any operation in the linear operator be final is similarly perverse since over-riding of linear operator operations is *exactly* what is expected. My guess is that the final declarations came out of an attempt to avoid warnings by over zealous code inspectors that allowing getters and setters of private fields to be over-ridden is dangerous. The warning is correct. The response was not. The correct response is to not have the private fields and make the getters and setters be abstract. On Wed, Jul 13, 2011 at 9:04 AM, Phil Steitz wrote: > 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. > --0016360e3b6203dead04a7f5f1a5--