Examples of Well44497b


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

                                      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 IntArrayList kroneckerAndMetricIds = new IntArrayList();

    NameManager(Long seed, String kronecker, String metric) {
        if (seed == null) {
            //FUTURE what is the best bit provider at this point???
            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

    int rowNum = 2;
    int haploidNum = 2;
    int groupNum = 1;
    int simSize = 1000000;
    CornSurface myCornSurface = new CornSurface(kernelNum,rowNum,haploidNum,groupNum);
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
//    CornSimulation myCornSimulation = new CornSimulation(myCornSurface,rng,simSize);
//    System.out.println("The pvalue for four neighbor group is: " + myCornSimulation.simulate(NeighborType.FourNeighbor)+".");
//
//    System.out.println("The pvalue for eight neighbor group is: "+ myCornSimulation.simulate(NeighborType.EightNeighbor)+".");
View Full Code Here

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

* @author adu
*
*/
public class TestSpeed {
  public static void main(String[] args) {
    RandomGenerator rg = new Well44497b();
    RandomDataImpl rng = new RandomDataImpl(rg);
    Timer timer = new Timer();
    timer.begin();
    final int MAX_THREADS = Runtime.getRuntime().availableProcessors();
    ExecutorService pool = Executors.newFixedThreadPool(MAX_THREADS);
View Full Code Here

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

import dclong.util.Timer;

public class TestRNGSpeed {
  public static void main(String[] args){
    //CommonMath
    RandomGenerator rg = new Well44497b(29);
    RandomDataImpl rng = new RandomDataImpl(rg);
    Timer timer = new Timer();
    timer.start();
    for(long i=0; i<130000000; ++i){
//      rng.nextPermutation(16, 8);
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.