class LUDecomposition implements AutoCloseable {

    public double determinant() {
        if (singular)
            return 0;

        final int m = pivot.size();
        double determinant = even ? 1 : -1;

        for (int i = 0; i < m; i++)
            determinant *= lu.getX(i, i);

        return determinant;
    }

    public  LUDecomposition(Matrix matrix);
    public  LUDecomposition(Matrix matrix, double singularityThreshold);

}