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 packages. Make sure that all imports have the same base-package, in your case: - import org.apache.commons.math3.optim Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
