Java Code Examples for org.apache.commons.math.FunctionEvaluationException#getCause()
The following examples show how to use
org.apache.commons.math.FunctionEvaluationException#getCause() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 2
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 3
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 4
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 5
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 6
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 7
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 8
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxEvaluationsExceededException.class) public void testMaxEvaluations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-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(); } throw fee; } }
Example 9
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxEvaluationsExceededException.class) public void testMaxEvaluations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-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(); } throw fee; } }
Example 10
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 11
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }
Example 12
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@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(); } throw fee; } }