/src/main/java/net/finmath/montecarlo/RandomVariableFromFloatArray.java
this.realizations = size == typePriority ? null : new float[size];
this.realizations = size == 1 ? null : new float[size];
public RandomVariableFromFloatArray(final double time, final double[] realisations) { this(time, getFloatArray(realisations), typePriorityDefault); } public RandomVariableFromFloatArray(final double time, final IntToDoubleFunction realizations, final int size, final int typePriority) { super(); this.time = time; <extra_id_0> valueIfNonStochastic = size == 1 ? realizations.applyAsDouble(0) : Double.NaN; if(size > 1) { IntStream.range(0,size).parallel().forEach(new IntConsumer() { @Override public void accept(final int i) { RandomVariableFromFloatArray.this.realizations[i] = (float) realizations.applyAsDouble(i);