/src/main/java/net/finmath/fouriermethod/calibration/models/CalibratableHestonModel.java
final double kappa = kappaInfo.getIsParameterToCalibrate( ) == true ? kappaInfo.getConstraint( ).apply( parameters[2]) : descriptor.getKappa( ) ;final double rho = rhoInfo.getIsParameterToCalibrate( ) == true ? rhoInfo.getConstraint( ).apply( parameters[4]) : descriptor.getRho( ) ;
final double rho = rhoInfo.getIsParameterToCalibrate ( ) == true ? rhoInfo.getConstraint ( ) .apply ( parameters[4] ) : descriptor.getRho ( ) ;
@Override public CalibratableHestonModel getCloneForModifiedParameters(final double[] parameters) { final double volatility = volatilityInfo.getIsParameterToCalibrate() == true ? volatilityInfo.getConstraint().apply(parameters[0]) : descriptor.getVolatility(); double theta = thetaInfo.getIsParameterToCalibrate() == true ? thetaInfo.getConstraint().apply(parameters[1]) : descriptor.getTheta(); final double kappa = kappaInfo.getIsParameterToCalibrate() == true ? kappaInfo.getConstraint().apply(parameters[2]) : descriptor.getKappa(); final double xi = xiInfo.getIsParameterToCalibrate() == true ? xiInfo.getConstraint().apply(parameters[3]) : descriptor.getXi(); <extra_id_0> if(applyFellerConstraint && 2*kappa*theta < xi*xi) { theta = xi*xi / (2 * kappa) + 1E-9; } final HestonModelDescriptor newDescriptor = new HestonModelDescriptor(descriptor.getReferenceDate(), descriptor.getInitialValue(),descriptor.getDiscountCurveForForwardRate(), descriptor.getDiscountCurveForDiscountRate(), volatility, theta, kappa, xi, rho);