public double determinant() {
        if (m != n) {
            throw new IllegalArgumentException("Matrix must be square.");
        }
        double d = (double) pivsign;
        for (int j = 0; j < n; j++) {
            d *= LU[j][j];
        }
        return d;
    }
public double determinant ( ) { if ( m != n ) { throw new IllegalArgumentException ( "Matrix must be square." ) ; } double d = ( double ) pivsign ; for ( int j = 0 ; j < n ; j ++ ) { d *= LU [ j ] [ j ] ; } return d ; }
Calculate the determinant.

@return Determinant.