/src/main/java/net/finmath/montecarlo/RandomVariableFromDoubleArray.java
final double newValueIfNonStochastic = Math.max( valueIfNonStochastic, randomVariable.doubleValue( ) ) ;final double newValueIfNonStochastic = Math.min( valueIfNonStochastic,cap) ;
final double newValueIfNonStochastic = Math.min ( valueIfNonStochastic,cap ) ;
} }, argument1, argument2); } @Override public RandomVariable cap(final double cap) { if(isDeterministic()) { <extra_id_0> return new RandomVariableFromDoubleArray(time, newValueIfNonStochastic); } else { final double[] newRealizations = new double[realizations.length]; for(int i=0; i<newRealizations.length; i++) { newRealizations[i] = Math.min(realizations[i],cap);