Package com.cloudera.cdk.morphline.shaded.org.apache.commons.math3.random

Examples of com.cloudera.cdk.morphline.shaded.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


                                            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

    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

    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

    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

    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

* @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

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

import org.apache.commons.math3.random.Well44497b;


public class TestFinal {
  public static void main(String[] args){
    RandomGenerator rg = new Well44497b(5);
    RandomDataImpl rng = new RandomDataImpl(rg);
    FinalClass fc = new FinalClass.Builder(rng).builder();
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
    System.out.println(fc.getRNG().nextInt(0, 10));
View Full Code Here

import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.Well44497b;

public class TestRNG {
  public static void main(String[] args){
    RandomGenerator rg = new Well44497b(29);
    RandomDataImpl rng = new RandomDataImpl(rg);
    int numberOfElements = 12870;
    int upper = numberOfElements - 1;
    int[] freq = new int[numberOfElements];
    Arrays.fill(freq, 0);
View Full Code Here

TOP

Related Classes of com.cloudera.cdk.morphline.shaded.org.apache.commons.math3.random.Well44497b

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.