Package org.apache.commons.math3.random

Examples of org.apache.commons.math3.random.MersenneTwister


            int maxEvaluations,
            PointValuePair expected) {
        int dim = startPoint.length;
        // test diagonalOnly = 0 - slow but normally fewer feval#
        CMAESOptimizer optim = new CMAESOptimizer(30000, stopValue, isActive, diagonalOnly,
                                                  0, new MersenneTwister(), false, null);
        final double[] lB = boundaries == null ? null : boundaries[0];
        final double[] uB = boundaries == null ? null : boundaries[1];
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
View Full Code Here


    private RandomGenerator generator;

    @Before
    public void setUp() {
        field = new DfpField(40);
        generator = new MersenneTwister(6176597458463500194l);
    }
View Full Code Here

    @Test
    public void testMath864() {
        final CMAESOptimizer optimizer
            = new CMAESOptimizer(30000, 0, true, 10,
                                 0, new MersenneTwister(), false, null);
        final MultivariateFunction fitnessFunction = new MultivariateFunction() {
                public double value(double[] parameters) {
                    final double target = 1;
                    final double error = target - parameters[0];
                    return error * error;
 
View Full Code Here

     */
    @Test
    public void testFitAccuracyDependsOnBoundary() {
        final CMAESOptimizer optimizer
            = new CMAESOptimizer(30000, 0, true, 10,
                                 0, new MersenneTwister(), false, null);
        final MultivariateFunction fitnessFunction = new MultivariateFunction() {
                public double value(double[] parameters) {
                    final double target = 11.1;
                    final double error = target - parameters[0];
                    return error * error;
 
View Full Code Here

                        int maxEvaluations,
                        PointValuePair expected) {
        int dim = startPoint.length;
        // test diagonalOnly = 0 - slow but normally fewer feval#
        CMAESOptimizer optim = new CMAESOptimizer(30000, stopValue, isActive, diagonalOnly,
                                                  0, new MersenneTwister(), false, null);
        PointValuePair result = boundaries == null ?
            optim.optimize(new MaxEval(maxEvaluations),
                           new ObjectiveFunction(func),
                           goal,
                           new InitialGuess(startPoint),
View Full Code Here

    private RandomGenerator generator;

    @Before
    public void setUp() {
        field = new DfpField(40);
        generator = new MersenneTwister(6176597458463500194l);
    }
View Full Code Here

            int maxEvaluations,
            PointValuePair expected) {
        int dim = startPoint.length;
        // test diagonalOnly = 0 - slow but normally fewer feval#
        CMAESOptimizer optim = new CMAESOptimizer(30000, stopValue, isActive, diagonalOnly,
                                                  0, new MersenneTwister(), false, null);
        final double[] lB = boundaries == null ? null : boundaries[0];
        final double[] uB = boundaries == null ? null : boundaries[1];
        PointValuePair result = boundaries == null ?
            optim.optimize(maxEvaluations, func, goal,
                           new InitialGuess(startPoint),
View Full Code Here

    }

    @Before
    public void setUp() {
        generator = createConvexHullGenerator(false);
        random = new MersenneTwister(10);
    }
View Full Code Here

*  - allow editing of the point set
*/
public class GeometryExample {

    public static List<Vector2D> createRandomPoints(int size) {
        RandomGenerator random = new MersenneTwister();

        // create the cloud container
        List<Vector2D> points = new ArrayList<Vector2D>(size);
        // fill the cloud with a random distribution of points
        for (int i = 0; i < size; i++) {
            points.add(new Vector2D(FastMath.round(random.nextDouble() * 400 + 100),
                    FastMath.round(random.nextDouble() * 400 + 100)));
        }
       
        return points;
    }
View Full Code Here

                                   new GammaDistribution(5, 1),
                                   new GammaDistribution(9, 0.5));
            container.add(comp, c);

            c.gridx++;
            RandomGenerator rng = new MersenneTwister(0);
            comp = createComponent("Levy", 0, 3,
                                   new String[] { "c=0.5", "c=1", "c=2", "c=4", "c=8" },
                                   new LevyDistribution(rng, 0, 0.5),
                                   new LevyDistribution(rng, 0, 1),
                                   new LevyDistribution(rng, 0, 2),
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.random.MersenneTwister

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.