Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 50039 invoked from network); 27 Sep 2004 18:21:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Sep 2004 18:21:52 -0000 Received: (qmail 86845 invoked by uid 500); 27 Sep 2004 18:21:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 86774 invoked by uid 500); 27 Sep 2004 18:21:46 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 86760 invoked by uid 99); 27 Sep 2004 18:21:46 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [128.186.38.55] (HELO bio.fsu.edu) (128.186.38.55) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 27 Sep 2004 11:21:46 -0700 Received: from [128.186.38.93] (linde-laptop.bio.fsu.edu [128.186.38.93]) by bio.fsu.edu (8.12.6p2/8.12.6) with ESMTP id i8RISstI028462 for ; Mon, 27 Sep 2004 14:28:54 -0400 (EDT) (envelope-from kim@kimvdlinde.com) Message-ID: <41585A21.2050507@kimvdlinde.com> Date: Mon, 27 Sep 2004 14:21:21 -0400 From: Kim van der Linde User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [math] API changes for RC2 References: <95F1CCA52E317C49AB7AA71B16E8988B0C238B@mail2.tsd.biz> In-Reply-To: <95F1CCA52E317C49AB7AA71B16E8988B0C238B@mail2.tsd.biz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Phil Steitz wrote: > "Spooky" -- delightful word choice ;-) The getDataRef method is > there to limit copy operations and to support hacking the underlying > array -- evil, hazardous, breaks encapsulation -- altogether > "spooky"; but users may want this in some cases. I do: Matrix diffMatrix = new Matrix(cases, variables); double diffArray[][] = diffMatrix.getDataRef(); double baseArray[][] = baseMatrix.getDataRef(); //verbose(true, "Robust baseMatrix\n"+baseMatrix.toSquareString()); for (int x = 0; x < cases; x++) { for (int y = 0; y < variables; y++) { diffArray[x][y] = baseArray[x][y] - robustMeans[y]; } } //verbose(true, "Robust diffArray\n"+diffMatrix.toSquareString()); robustDist = Distances.mahalanobis(diffMatrix, robustCovar); det = Math.sqrt(robustCovar.getDeterminant()); Just an example....... Kim -- http://www.kimvdlinde.com --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org