Package org.apache.commons.math.optimization

Examples of org.apache.commons.math.optimization.SimpleRealPointChecker


  @Test(expected = MaxEvaluationsExceededException.class)
  public void testMaxEvaluations() throws MathException {
      try {
          Powell powell = new Powell();
          NelderMead optimizer = new NelderMead();
          optimizer.setConvergenceChecker(new SimpleRealPointChecker(-1.0, 1.0e-3));
          optimizer.setMaxEvaluations(20);
          optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 });
      } catch (FunctionEvaluationException fee) {
          if (fee.getCause() instanceof ConvergenceException) {
              throw (ConvergenceException) fee.getCause();
View Full Code Here


  @Test(expected = MaxEvaluationsExceededException.class)
  public void testMaxEvaluations() throws MathException {
      try {
          Powell powell = new Powell();
          NelderMead optimizer = new NelderMead();
          optimizer.setConvergenceChecker(new SimpleRealPointChecker(-1.0, 1.0e-3));
          optimizer.setMaxEvaluations(20);
          optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 });
      } catch (FunctionEvaluationException fee) {
          if (fee.getCause() instanceof ConvergenceException) {
              throw (ConvergenceException) fee.getCause();
View Full Code Here

  @Test(expected = MaxEvaluationsExceededException.class)
  public void testMaxEvaluations() throws MathException {
      try {
          Powell powell = new Powell();
          NelderMead optimizer = new NelderMead();
          optimizer.setConvergenceChecker(new SimpleRealPointChecker(-1.0, 1.0e-3));
          optimizer.setMaxEvaluations(20);
          optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 });
      } catch (FunctionEvaluationException fee) {
          if (fee.getCause() instanceof ConvergenceException) {
              throw (ConvergenceException) fee.getCause();
View Full Code Here

TOP

Related Classes of org.apache.commons.math.optimization.SimpleRealPointChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.