commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <>
Subject Re: Conjugate Gradient Math 3.2
Date Fri, 22 Nov 2013 19:46:25 GMT
On 11/22/2013 07:00 PM, rambor wrote:
> Hi,
> I am having a horrible time trying to get the new interfaces to work. I
> clearly don't understand the changes.
> I'd like to do the NonLinearConjugateGradientOptimizer and I can't get the
> constructor to work in the new implementation.  So far, I have:
> NonLinearConjugateGradientOptimizer optimizer = new
> NonLinearConjugateGradientOptimizer(NonLinearConjugateGradientOptimizer.Formula.POLAK_RIBIERE,
> new SimpleValueChecker(1e-13, 1e-13));
> The error is thrown on SimpleValueChecker, it requires a convergence
> checker.  How do I make an instance of ConvergenceChecker that is acceptable
> to the NonLinearConjugateGradient constructor?

Hi Rambor,

please check your import statements. Most likely you have mixed imports
from the following two packages:

 - import org.apache.commons.math3.optim
 - import org.apache.commons.math3.optimization

when we did the refactoring to the new optim packages, a lot of the
class names did not actually change (only the package), thus it may
happen that you have the same class, e.g. SimpleValueChecker in both

Make sure that all imports have the same base-package, in your case:

 - import org.apache.commons.math3.optim


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

View raw message