Examples of Well44497b


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

     * to the trainer.
     */
    public TravellingSalesmanSolver(City[] cityList,
                                    double numNeuronsPerCity,
                                    long seed) {
        random = new Well44497b(seed);

        final double[] xRange = {Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY};
        final double[] yRange = {Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY};

        // Make sure that each city will appear only once in the list.
View Full Code Here

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

                                      double y,
                                      double radius,
                                      double xSigma,
                                      double ySigma,
                                      long seed) {
        final RandomGenerator rng = new Well44497b(seed);
        this.radius = radius;
        cX = new NormalDistribution(rng, x, xSigma,
                                    NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
        cY = new NormalDistribution(rng, y, ySigma,
                                    NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
View Full Code Here

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

                                            double b,
                                            double sigma,
                                            double lo,
                                            double hi,
                                            long seed) {
        final RandomGenerator rng = new Well44497b(seed);
        slope = a;
        intercept = b;
        error = new NormalDistribution(rng, 0, sigma,
                                       NormalDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY);
        x = new UniformRealDistribution(rng, lo, hi,
View Full Code Here

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

    private final String[] kroneckerAndMetricNames = {"d", "g"};
    private final IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            random = new Well44497b();
            random.setSeed(this.seed = random.nextLong());
        } else
            random = new Well44497b(this.seed = seed);
        kroneckerAndMetricNames[0] = kronecker;
        kroneckerAndMetricNames[1] = metric;
    }
View Full Code Here

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

    private final String[] kroneckerAndMetricNames = {"d", "g"};
    private final IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            random = new Well44497b();
            random.setSeed(this.seed = random.nextLong());
        } else
            random = new Well44497b(this.seed = seed.longValue());
        kroneckerAndMetricNames[0] = kronecker;
        kroneckerAndMetricNames[1] = metric;
    }
View Full Code Here

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

    private final String[] kroneckerAndMetricNames = {"d", "g"};
    private final IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            random = new Well44497b();
            random.setSeed(this.seed = random.nextLong());
        } else
            random = new Well44497b(this.seed = seed);
        kroneckerAndMetricNames[0] = kronecker;
        kroneckerAndMetricNames[1] = metric;
    }
View Full Code Here

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

  public static void main(String[] args){
   
    double[] weight = new double[10];
    initializeWeight(weight);
    int n = 100000;
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    dclong.util.Timer timer = new dclong.util.Timer();
    timer.start();
    double[] proportion = sample(rng,weight,n);
    timer.end();
View Full Code Here

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

    private final String[] kroneckerAndMetricNames = {"d", "g"};
    private final IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            random = new Well44497b();
            random.setSeed(this.seed = random.nextLong());
        } else
            random = new Well44497b(this.seed = seed);
        kroneckerAndMetricNames[0] = kronecker;
        kroneckerAndMetricNames[1] = metric;
    }
View Full Code Here

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

            case WELL19937C:
                return new RandomAdaptor(randomSeed == null ? new Well19937c() : new Well19937c(randomSeed));
            case WELL44497A:
                return new RandomAdaptor(randomSeed == null ? new Well44497a() : new Well44497a(randomSeed));
            case WELL44497B:
                return new RandomAdaptor(randomSeed == null ? new Well44497b() : new Well44497b(randomSeed));
            default:
                throw new IllegalStateException("The randomType (" + randomType + ") is not implemented.");
        }
    }
View Full Code Here

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

    private final String[] kroneckerAndMetricNames = {"d", "g"};
    private final IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            random = new Well44497b();
            random.setSeed(this.seed = random.nextLong());
        } else
            random = new Well44497b(this.seed = seed);
        kroneckerAndMetricNames[0] = kronecker;
        kroneckerAndMetricNames[1] = metric;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.