class LUDecomposition {

    public RealMatrix getP() {
        if ((cachedP == null) && !singular) {
            final int m = pivot.length;
            cachedP = MatrixUtils.createRealMatrix(m, m);
            for (int i = 0; i < m; ++i) {
                cachedP.setEntry(i, pivot[i], 1.0);
            }
        }
        return cachedP;
    }

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

}