Java Code Examples for org.apache.commons.math.optimization.OptimizationException#getCause()
The following examples show how to use
org.apache.commons.math.optimization.OptimizationException#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 = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 2
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 3
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 4
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 5
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 6
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 7
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 8
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 9
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 10
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 11
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }
Example 12
Source File: NelderMeadTest.java From astor with GNU General Public License v2.0 | 5 votes |
@Test(expected = MaxIterationsExceededException.class) public void testMaxIterations() throws MathException { try { Powell powell = new Powell(); NelderMead optimizer = new NelderMead(); optimizer.setConvergenceChecker(new SimpleScalarValueChecker(-1.0, 1.0e-3)); optimizer.setMaxIterations(20); optimizer.optimize(powell, GoalType.MINIMIZE, new double[] { 3.0, -1.0, 0.0, 1.0 }); } catch (OptimizationException oe) { if (oe.getCause() instanceof ConvergenceException) { throw (ConvergenceException) oe.getCause(); } throw oe; } }