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 1D0467C7C for ; Fri, 9 Sep 2011 01:35:33 +0000 (UTC) Received: (qmail 24174 invoked by uid 500); 9 Sep 2011 01:35:32 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 23913 invoked by uid 500); 9 Sep 2011 01:35:31 -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 23905 invoked by uid 99); 9 Sep 2011 01:35:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 01:35:31 +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 (athena.apache.org: domain of sebastien.brisard@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vx0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 01:35:24 +0000 Received: by vxh2 with SMTP id 2so1366373vxh.30 for ; Thu, 08 Sep 2011 18:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=leVHDch27950fVX2lAx/twWfhV271Oot/bBxNvCLxFU=; b=l9Gy0cp0wrNoHaiGMn7wgPCH9M6qCPQ5ahtmBMJZYLBh4NWJij+jQOh5z/yKTFRXRB 4qhvWAYean1lDHNWWgg1QfTBS5hNYMuxzdGFoiMpbOAwgzEagaKfM2oAl7VdZXuXu9Gn PAcHq9lioraG3T0CkrMgTh1NJGhRqPc9yJrH8= MIME-Version: 1.0 Received: by 10.221.13.133 with SMTP id pm5mr414822vcb.9.1315532103787; Thu, 08 Sep 2011 18:35:03 -0700 (PDT) Sender: sebastien.brisard@gmail.com Received: by 10.220.188.134 with HTTP; Thu, 8 Sep 2011 18:35:03 -0700 (PDT) In-Reply-To: <4E6919E1.3010905@free.fr> References: <4E6919E1.3010905@free.fr> Date: Fri, 9 Sep 2011 03:35:03 +0200 X-Google-Sender-Auth: uQH0PSTg6IcpzPYCyjm8wrinIgc Message-ID: Subject: Re: [math] use the more general super-type RealMatrix in place of Array2DRowRealMatrix in package ode? From: =?ISO-8859-1?Q?S=E9bastien_Brisard?= To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Luc, thanks for your detailed explanations attached to the MATH-659. I'm worried about the changes I have applied to the code, now. Here is what I've done. I've replaced the following line {code} return new Array2DRowRealMatrix(decomposition.getSolver().solve(b), false); {code} with {code} RealMatrix x =3D decomposition.getSolver().solve(new Array2DRowRealMatrix(b, false)); return new Array2DRowRealMatrix(x.getData(), false); {code} decomposition is in fact an instance of QRDecompositionImpl.Solver, whose method solve(RealMatrix) returns a BlockRealMatrix, not an Array2DRowRealMatrix, hence the ugly last line. This code seems to be correct (unit tests still pass), but I'm worried about the efficiency, especially if initializeHighOrderDerivatives is called very often. What do you think should be done? Best regards, S=E9bastien --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org