Example usage for org.apache.commons.math3.random UniformRandomGenerator nextNormalizedDouble

List of usage examples for org.apache.commons.math3.random UniformRandomGenerator nextNormalizedDouble

Introduction

In this page you can find the example usage for org.apache.commons.math3.random UniformRandomGenerator nextNormalizedDouble.

Prototype

public double nextNormalizedDouble() 

Source Link

Document

Generate a random scalar with null mean and unit standard deviation.

Usage

From source file:org.briljantframework.benchmark.DataFrameSortPerformance.java

@Setup(Level.Iteration)
public void setupDataFrame() {
    DataFrame.Builder builder = new MixedDataFrame.Builder();
    UniformRandomGenerator gen = new UniformRandomGenerator(new Well1024a());
    for (int i = 0; i < 1000_000; i++) {
        builder.setRecord(String.valueOf(i), Vector.of(gen.nextNormalizedDouble(), i, 20.0, 30.0));
    }//  w  w  w  .  j ava2  s.  c o m
    builder.setColumnIndex("First", "Second", "Third", "Fourth");
    dataFrame = builder.build();
}

From source file:org.briljantframework.benchmark.VectorSortPerformance.java

@Setup(Level.Iteration)
public void setupDataFrame() {
    Vector.Builder builder = Vector.Builder.of(Double.class);
    UniformRandomGenerator gen = new UniformRandomGenerator(new Well1024a());
    for (int i = 0; i < 1000_000; i++) {
        builder.add(gen.nextNormalizedDouble());
    }/* ww w. j a  va2s .com*/
    vector = builder.build();
}