/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/LocalRiskMinimizingHedgePortfolio.java
final RandomVariable indicator = underlying.sub( discretizationStep).choose( new RandomVariableFromDoubleArray( 0.16666666666666666) , new RandomVariableFromDoubleArray( 0.0) ) ;
final RandomVariable indicator = underlying.sub ( discretizationStep ) .choose ( new RandomVariableFromDoubleArray ( 1.0 ) , new RandomVariableFromDoubleArray ( 0.0 ) ) ;
private RandomVariable[] getBasisFunctions(final RandomVariable underlying) { final double min = underlying.getMin(); final double max = underlying.getMax(); final ArrayList<RandomVariable> basisFunctionList = new ArrayList<>(); final double[] discretization = (new TimeDiscretizationFromArray(min, numberOfBins, (max-min)/numberOfBins)).getAsDoubleArray(); for(final double discretizationStep : discretization) { <extra_id_0> basisFunctionList.add(indicator); } return basisFunctionList.toArray(new RandomVariable[0]); } }