commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <>
Subject [math] JIRA MATH-653 CholeskyDecompositionImpl
Date Sun, 04 Sep 2011 09:14:49 GMT
In JIRA MATH-653, Gilles initiated a simplification of the RealVector
abstract class, by removing all methods which make use of double[] as
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
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?

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

View raw message