/** * Decomposes the input matrix 'a' and makes sure it isn't modified. */ public static bool decomposeSafe(DecompositionInterface <CMatrixRMaj> decomposition, CMatrixRMaj a) { if (decomposition.inputModified()) { a = (CMatrixRMaj)a.copy(); } return(decomposition.decompose(a)); }
/** * A simple convinience function that decomposes the matrix but automatically checks the input ti make * sure is not being modified. * * @param decomp Decomposition which is being wrapped * @param M THe matrix being decomposed. * @param <T> Matrix type. * @return If the decomposition was successful or not. */ public static bool decomposeSafe <T>(DecompositionInterface <T> decomp, T M) where T : DMatrix { if (decomp.inputModified()) { return(decomp.decompose((T)M.copy())); } else { return(decomp.decompose(M)); } }
public BaseDecomposition_DDRB_to_DDRM(DecompositionInterface <DMatrixRBlock> alg, int blockLength) { this.alg = alg; this.blockLength = blockLength; }
public CholeskyDecomposition_DDRB_to_DDRM(DecompositionInterface <DMatrixRBlock> alg, int blockLength) : base(alg, blockLength) { }