commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject [math] silly classes naming question
Date Wed, 12 Sep 2012 11:53:51 GMT
Hi all,

Continuing the work on the new differentiation framework, I am facing a
silly naming problem. This problem is exactly the same I encountered
while I updated the solvers: the Java language does not allow to inherit
from the same parameterized interface with two different parameters.

So when I want to update class LevenbergMarquardtOptimizer which extends
AbstractLeastSquaresOptimizer which itself extends
I hit the problem. I cannot have
in the same hierarchy.

For solvers, we decided to duplicate the hierarchy, and I ended up
creating a new NewtonRaphsonSolver while deprecating the older
NewtonSolver. I would like to do the same for the optimizers.

As the intermediate class AbstractLeastSquaresOptimizer is not really
something most users will use, a simple name change to
AbstractLSOptimizer seems sufficient. Such simple name changes would not
be good for end-users classes like LevenbergMarquardtOptimizer,
NonLinearConjugateGradientOptimizer or GaussNewtonOptimizer. Note that
the core algorithms do not change at all, only the signatures change as
well as one line in AbstractLeastSquaresOptimizer (to be precise, the
changed line is from: "jF = f.jacobian()" to "jf = jF = new

Does someone has clever name changes to propose or should I simply keep
only the existing classes, add the new signatures but do not declare
them as implementing top level parameterized interfaces?

I'm sorry to ask such silly questions, but I am stuck with this Java

best regards,

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

View raw message