public static < T extends DMatrix > boolean decomposeSafe ( DecompositionInterface < T > decomp , T M ) { if ( decomp . inputModified ( ) ) { return decomp . decompose ( M . < T > copy ( ) ) ; } else { return decomp . decompose ( M ) ; } }
A simple convinience function that decomposes the matrix but automatically checks the input ti make sure is not being modified .