public void asolve(final double[] b, final double[] x, final int itrnsp) {
    int i,j;
    double diag;
    for (i=0;i<n;i++) {
      diag=0.0;
      for (j=mat.col_ptr[i];j<mat.col_ptr[i+1];j++)
        if (mat.row_ind[j] == i) {
          diag=mat.val[j];
          break;
        }
      x[i]=(diag != 0.0 ? b[i]/diag : b[i]);
    }
  }