commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject Re: [math] JIRA MATH-653 CholeskyDecompositionImpl
Date Sun, 04 Sep 2011 10:00:29 GMT
Le 04/09/2011 11:14, Sébastien Brisard a écrit :
> Hi,

Hi Sébastien,

> In JIRA MATH-653, Gilles initiated a simplification of the RealVector
> abstract class, by removing all methods which make use of double[] as
> RealVectors.
> The logical step is to simplify DecompositionSolver along these lines.
> While doing this for CholeskyDecompositionImpl, I initially intended
> to inline the code corresponding to solve(double[]) in
> solve(ArrayRealVector).
> However, looking more closely at the code, I'm not sure there is any
> gain in distinguishing general RealVectors, and ArrayRealVectors (and
> eventually double[]). Indeed, in the first case, there is a call to
> b.getData() (see line 240)
> and in the other case
> b.clone() (see line 205)
> So basically, in both cases, a new double[] is created, and data is
> copied from b to x, with the additional drawback of having duplicate
> code. So I suggest to remove solve(ArrayRealVector), and keep only
> solve(RealVector). This should come to no harm in terms of
> performances, I think.
> Do you agree with that?

Yes, this seems fair.


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message