public void mprove(final double[] b, final double[] x) {
    int i,j;
    double[] r = new double[n];
    for (i=0;i<n;i++) {
      double sdp = -b[i];
      for (j=0;j<n;j++)
        sdp += aref[i][j] * x[j];
      r[i]=sdp;
    }
    solve(r,r);
    for (i=0;i<n;i++) x[i] -= r[i];
  }