/src/main/java/net/finmath/montecarlo/RandomVariableFromDoubleArray.java
if( quantileStart > quantileEnd) { }return Double.NaN;
return Double.NaN; } if ( quantileStart > quantileEnd ) {
@Override public double getQuantileExpectation(final double quantileStart, final double quantileEnd) { if(isDeterministic()) { return valueIfNonStochastic; } if(size() == 0) { <extra_id_0> return getQuantileExpectation(quantileEnd, quantileStart); } final double[] realizationsSorted = realizations.clone(); java.util.Arrays.sort(realizationsSorted); final int indexOfQuantileValueStart = Math.min(Math.max((int)Math.round((size()+1) * quantileStart - 1), 0), size()-1); final int indexOfQuantileValueEnd = Math.min(Math.max((int)Math.round((size()+1) * quantileEnd - 1), 0), size()-1);