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 BE0878C32 for ; Wed, 7 Sep 2011 06:08:17 +0000 (UTC) Received: (qmail 78786 invoked by uid 500); 7 Sep 2011 06:08:13 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 78116 invoked by uid 500); 7 Sep 2011 06:07:57 -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 77694 invoked by uid 99); 7 Sep 2011 06:07:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2011 06:07:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aploese@gmx.de designates 213.165.64.23 as permitted sender) Received: from [213.165.64.23] (HELO mailout-de.gmx.net) (213.165.64.23) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 07 Sep 2011 06:07:37 +0000 Received: (qmail invoked by alias); 07 Sep 2011 06:07:14 -0000 Received: from pD9E93FFD.dip.t-dialin.net (EHLO [192.168.69.11]) [217.233.63.253] by mail.gmx.net (mp071) with SMTP; 07 Sep 2011 08:07:14 +0200 X-Authenticated: #1436251 X-Provags-ID: V01U2FsdGVkX18NSM4tmX4NrOYljFpt6la/NE5g/SR5ExoySoW9Bh 8U9n1uopkteHU1 Subject: Re: [math] RealVector.toArray() vs. RealVector.getData() From: Arne Ploese Reply-To: aploese@gmx.de To: Commons Developers List In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Wed, 07 Sep 2011 08:07:07 +0200 Message-ID: <1315375627.2985.3.camel@knuffelchen> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 If toArray() returns always a copy and if getArrayRef() throws an exception if there is no backing array, it would be much clearer. A property isArray() is needed in this case. Arne Am Mittwoch, den 07.09.2011, 04:19 +0200 schrieb Sébastien Brisard: > Hi, > as noted in MATH-653, these two methods are redundant, and one should > go. Pros and cons are > * toArray() is fairly classical in the Java world > * but getData() is consistent with ArrayRealVector.getDataRef(). > Personnaly, my preference goes to keeping toArray(). In order to > maintain consistency, should ArrayRealVector.getDataRef() be renamed > getArrayRef() ? > > 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