/src/main/java/net/finmath/marketdata/model/curves/locallinearregression/CurveEstimation.java
final DoubleMatrix partitionIncrementMatrix= new DoubleMatrix ( partition.getLength ( ) -1,partition.getLength ( ) -1 ) ;
MSubMatrixSum=MSubMatrixSum.add( partitionAsVector.getRange(0, partitionAsVector.length-1).neg().add(independentValues[i]) .mul(kernelValues).add( partitionIncrements.getRange(1, partitionIncrements.length) .mul(kernelSum.getRange(1, kernelSum.length)))); } <extra_id_0> final DoubleMatrix matrixDefine= DoubleMatrix.ones(partition.getLength()-1); for(int m=0;m<matrixDefine.length-1;m++) { matrixDefine.put(m, 0); partitionIncrementMatrix.putColumn(m, matrixDefine.mul(partitionIncrements.get(m+1))); } MSubMatrix=partitionIncrementMatrix.mulColumnVector(MSubMatrixSum);