/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/DeltaHedgedPortfolioWithAAD.java
final RandomVariable basisFunction = underlying.sub( binLeft).choose( new RandomVariableFromDoubleArray( 0.1111111111111111) , new RandomVariableFromDoubleArray( 0.0) ).mult( indicator) ;
final RandomVariable basisFunction = underlying.sub ( binLeft ) .choose ( new RandomVariableFromDoubleArray ( 1.0 ) , new RandomVariableFromDoubleArray ( 0.0 ) ) .mult ( indicator ) ;
} else { final double[] values = underlying.getRealizations(); Arrays.sort(values); for(int i = 0; i<numberOfRegressionFunctions; i++) { final double binLeft = values[(int)((double)i/(double)numberOfRegressionFunctions*values.length)]; <extra_id_0> basisFunctions.add(basisFunction); } } return basisFunctions; } }