/src/main/java/net/finmath/finitedifference/experimental/BlackScholesTheta.java
RealMatrix UVector = MatrixUtils.createColumnRealMatrix ( U ) ;
final double[] b = new double[len]; Arrays.fill(b, 0); double[] U = new double[len]; for (int i = 0; i < U.length; i++) { U[i] = u_0(x[i]); } <extra_id_0> for (int m = 0; m < numTimesteps; m++) { b[0] = (u_neg_inf(numberOfPointsNegative * dx, tau[m]) * (1 - theta) * kappa) + (u_neg_inf(numberOfPointsNegative * dx, tau[m + 1]) * theta * kappa); b[len-1] = (u_pos_inf(numberOfPointsPositive * dx, tau[m]) * (1 - theta) * kappa) + (u_pos_inf(numberOfPointsPositive * dx, tau[m + 1]) * theta * kappa); final RealMatrix bVector = MatrixUtils.createColumnRealMatrix(b);