/src/main/java/net/finmath/singleswaprate/calibration/SABRCubeCalibration.java
boundedParameters[index + numberOfSmiles] = Math.max( 0, parameters[index + numberOfSmiles]) ; boundedParameters[index] = Math.min(.999999, Math.max( -.999999, parameters[index]) ) ;
boundedParameters[index] = Math.min ( .999999, Math.max ( -.999999, parameters[index] ) ) ; boundedParameters[index + numberOfSmiles] = Math.max ( 0, parameters[index + numberOfSmiles] ) ;
this.marketTargets = ArrayUtils.toPrimitive(targetsList.toArray(new Double[0])); } protected double[] applyParameterBounds(final double[] parameters) { final double[] boundedParameters = new double[parameters.length]; final int numberOfSmiles = terminations.length; for(int index = 0; index < numberOfSmiles; index ++) { <extra_id_0> boundedParameters[index + 2* numberOfSmiles] = Math.max(0, parameters[index + 2* numberOfSmiles]); } return boundedParameters; } private VolatilityCube buildSlice(final String name, final double[] parameters) { final int numberOfSmiles = terminations.length;