public bool isNonsingular() { for (int j = 0; j < n; j++) { if (LU[j][j] == 0) return false; } return true; }