/src/main/java/net/finmath/marketdata/model/curves/locallinearregression/CurveEstimation.java
R=R.add( shiftedPartition.neg( ).add( nndependentValues[i]).mul( shiftedKernelVector).add( partitionIncrements.mul( kernelSum) ).mul( dependentValues[i]) ) ;
R=R.add ( shiftedPartition.neg ( ) .add ( independentValues[i] ) .mul ( shiftedKernelVector ) .add ( partitionIncrements.mul ( kernelSum ) ) .mul ( dependentValues[i] ) ) ;
for(int r=0;r<partition.getLength()-1;r++){ oneZeroVector.put(r, 1); kernelValues.put( r,kernel.density((partition.getIntervalReferencePoint(r)-independentValues[i])/bandwidth)); shiftedKernelVector.put(r+1,kernelValues.get( r) ); kernelSum=kernelSum.add(oneZeroVector.mmul(kernelValues.get(r))); } <extra_id_0> M1_1=M1_1.add( kernelSum.get(0)); MFirstCol=MFirstCol.add( partitionAsVector.getRange(0,partitionAsVector.length-1).neg().add(independentValues[i]) .mul(kernelValues).add( partitionIncrements.getRange(1,partitionAsVector.length) .mul(kernelSum.getRange(1, kernelSum.length))));