docs: @Override
  	public double getQuantileExpectation(double quantileStart, double quantileEnd) {
  		if(isDeterministic()) {
  			return valueIfNonStochastic;
  		}
  		if(size() == 0) {
  			return Double.NaN;
  		}
  		if(quantileStart > quantileEnd) {
  			return getQuantileExpectation(quantileEnd, quantileStart);
  		}
  
  		float[] realizationsSorted = realizations.clone();
  		java.util.Arrays.sort(realizationsSorted);
  
  		int indexOfQuantileValueStart	= Math.min(Math.max((int)Math.round((size()+1) * quantileStart - 1), 0), size()-1);
  		int indexOfQuantileValueEnd		= Math.min(Math.max((int)Math.round((size()+1) * quantileEnd - 1), 0), size()-1);
  
  		double quantileExpectation = 0.0;
  		for (int i=indexOfQuantileValueStart; i<=indexOfQuantileValueEnd;i++) {
  			quantileExpectation += realizationsSorted[i];
  		}
  		quantileExpectation /= indexOfQuantileValueEnd-indexOfQuantileValueStart+1;
  
  		return quantileExpectation;
  	}