100101102103104105106107108109110
u.setQuick (i, j, v); v *= x[i]; } } final DoubleMatrix2D yMat = new DenseDoubleMatrix2D (x.length, 1); yMat.viewColumn (0).assign (y); final DoubleMatrix2D bMat = alg.solve (u, yMat); return bMat.viewColumn (0).toArray (); }