if (b_jj == 0.0) {
if (m_Elements[col][col] == 0.0) {
  public int [] LUDecomposition() throws Exception{        int nr = m_Elements.length;    // num of rows    int nc = m_Elements[0].length; // num of columns    int [] piv = new int[nr];    double [] factor = new double[nr];    double dd;    for (int row = 0; row < nr; row++) {      double max = Math.abs(m_Elements[row][0]);      for (int col = 1; col < nc; col++) {	if ((dd = Math.abs(m_Elements[row][col])) > max)	  max = dd;      }      if (max < 0.000000001) {	throw new Exception("Matrix is singular!");      }      factor[row] = 1 / max;    }    for (int i = 1; i < nr; i++) piv[i] = i;    for (int col = 0; col < nc; col++) {      // compute beta i,j      for (int row = 0; (row <= col) && (row < nr); row ++) {	double sum = 0.0;	for (int k = 0; k < row; k++) {	  sum += m_Elements[row][k] * m_Elements[k][col];	}	m_Elements[row][col] = m_Elements[row][col] - sum; // beta i,j;      }      // compute alpha i,j      for (int row = col + 1; row < nr; row ++) {	double sum = 0.0;	for (int k = 0; k < col; k++) {	  sum += m_Elements[row][k] * m_Elements[k][col];	}        // alpha i,j before division	m_Elements[row][col] = (m_Elements[row][col] - sum);      }            // find row for division:see if any of the alphas are larger then b j,j      double maxFactor = Math.abs(m_Elements[col][col]) * factor[col];      int newrow = col;      for (int ii = col + 1; ii < nr; ii++) {	if ((Math.abs(m_Elements[ii][col]) * factor[ii]) > maxFactor) {	  newrow = ii; // new row	  maxFactor = Math.abs(m_Elements[ii][col]) * factor[ii];	}        }      if (newrow != col) {        // swap the rows	for (int kk = 0; kk < nc; kk++) {	  double hh = m_Elements[col][kk];	  m_Elements[col][kk] = m_Elements[newrow][kk];	  m_Elements[newrow][kk] = hh;	}	// remember pivoting	int help = piv[col]; piv[col] = piv[newrow]; piv[newrow] = help;	double hh  = factor[col]; factor[col] = factor[newrow]; factor[newrow] = help;      }      double b_jj = m_Elements[col][col];      if (b_jj == 0.0) {	throw new Exception("Matrix is singular");      }      for (int row = col + 1; row < nr; row ++) {	// divide all 	m_Elements[row][col] = m_Elements[row][col] / b_jj;      }   }    return piv;  }