Package org.apache.commons.math3.optimization

Examples of org.apache.commons.math3.optimization.SimpleVectorValueChecker


                00,   00, epsilon, 1 },
                00,   00,       1, 1 }
        }, new double[] { 2, -9, 2, 2, 1 + epsilon * epsilon, 2});

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        PointVectorValuePair optimum =
            optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1, 1, 1, 1 },
                               new double[] { 0, 0, 0, 0, 0, 0 });
        Assert.assertEquals(0, optimizer.getRMS(), 1.0e-10);
View Full Code Here


                2, 13 },
                { -3, 0, -9 }
        }, new double[] { 1, 1, 1 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1 }, new double[] { 0, 0, 0 });
    }
View Full Code Here

                8.0, 6.0, 10.09.0 },
                7.0, 5.09.0, 10.0 }
        }, new double[] { 32, 23, 33, 31 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        PointVectorValuePair optimum1 =
            optimizer.optimize(100, problem1, problem1.target, new double[] { 1, 1, 1, 1 },
                               new double[] { 0, 1, 2, 3 });
        Assert.assertEquals(0, optimizer.getRMS(), 1.0e-10);
View Full Code Here

                { 0.0, 1.0, -1.0, 1.0 },
                { 2.0, 0.01.0, 0.0 }
        }, new double[] { 7.0, 3.0, 5.0 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1 },
                           new double[] { 7, 6, 5, 4 });
    }
View Full Code Here

                 { 0.0, 0.0, -1.01.0, 0.01.0 },
                 { 0.0, 0.00.0, -1.0, 1.00.0 }
        }, new double[] { 3.0, 12.0, -1.0, 7.0, 1.0 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1, 1, 1 },
                           new double[] { 2, 2, 2, 2, 2, 2 });
    }
View Full Code Here

                { 1.0, -1.0 },
                { 1.03.0 }
        }, new double[] { 3.0, 1.0, 5.0 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        PointVectorValuePair optimum =
            optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1 },
                               new double[] { 1, 1 });
        Assert.assertEquals(0, optimizer.getRMS(), 1.0e-10);
View Full Code Here

                { 1.0, -1.0 },
                { 1.03.0 }
        }, new double[] { 3.0, 1.0, 4.0 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        optimizer.optimize(100, problem, problem.target, new double[] { 1, 1, 1 }, new double[] { 1, 1 });
        Assert.assertTrue(optimizer.getRMS() > 0.1);

    }
View Full Code Here

    public void testInconsistentSizes1() {
        LinearProblem problem =
            new LinearProblem(new double[][] { { 1, 0 }, { 0, 1 } }, new double[] { -1, 1 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        PointVectorValuePair optimum =
            optimizer.optimize(100, problem, problem.target, new double[] { 1, 1 }, new double[] { 0, 0 });
        Assert.assertEquals(0, optimizer.getRMS(), 1.0e-10);
        Assert.assertEquals(-1, optimum.getPoint()[0], 1.0e-10);
View Full Code Here

    public void testInconsistentSizes2() {
        LinearProblem problem =
            new LinearProblem(new double[][] { { 1, 0 }, { 0, 1 } }, new double[] { -1, 1 });

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));

        PointVectorValuePair optimum =
            optimizer.optimize(100, problem, problem.target, new double[] { 1, 1 }, new double[] { 0, 0 });
        Assert.assertEquals(0, optimizer.getRMS(), 1.0e-10);
        Assert.assertEquals(-1, optimum.getPoint()[0], 1.0e-10);
View Full Code Here

        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-30, 1.0e-30));

        optimizer.optimize(100, circle, new double[] { 0, 0, 0, 0, 0 },
                           new double[] { 1, 1, 1, 1, 1 },
                           new double[] { 98.680, 47.345 });
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.optimization.SimpleVectorValueChecker

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.