List of usage examples for org.apache.commons.math3.random UniformRandomGenerator nextNormalizedDouble
public double nextNormalizedDouble()
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(); }