public static LinearSolverSparse <DMatrixSparseCSC, DMatrixRMaj> lu(FillReducing permutation) { ComputePermutation <DMatrixSparseCSC> cp = FillReductionFactory_DSCC.create(permutation); LuUpLooking_DSCC lu = new LuUpLooking_DSCC(cp); return(new LinearSolverLu_DSCC(lu)); }
public static LinearSolverSparse <DMatrixSparseCSC, DMatrixRMaj> qr(FillReducing permutation) { ComputePermutation <DMatrixSparseCSC> cp = FillReductionFactory_DSCC.create(permutation); QrLeftLookingDecomposition_DSCC qr = new QrLeftLookingDecomposition_DSCC(cp); return(new LinearSolverQrLeftLooking_DSCC(qr)); }
public static LinearSolverSparse <DMatrixSparseCSC, DMatrixRMaj> cholesky(FillReducing permutation) { ComputePermutation <DMatrixSparseCSC> cp = FillReductionFactory_DSCC.create(permutation); CholeskyUpLooking_DSCC chol = (CholeskyUpLooking_DSCC)DecompositionFactory_DSCC.cholesky(); return(new LinearSolverCholesky_DSCC(chol, cp)); }
public static ComputePermutation <DMatrixSparseCSC> create(FillReducing type) { switch (type) { case FillReducing.NONE: return(null); case FillReducing.RANDOM: // TODO : Implement! throw new NotImplementedException(); //return new ComputePermutation<DMatrixSparseCSC>(true, true) { //@Override //public void process(DMatrixSparseCSC m) //{ // prow.reshape(m.numRows); // pcol.reshape(m.numCols); // fillSequence(prow); // fillSequence(pcol); // Random _rand; // synchronized(rand) { // _rand = new Random(rand.nextInt()); // } // UtilEjml.shuffle(prow.data, prow.Length, 0, prow.Length, _rand); // UtilEjml.shuffle(pcol.data, pcol.Length, 0, pcol.Length, _rand); //} //}; case FillReducing.IDENTITY: // TODO : Implement! throw new NotImplementedException(); //return new ComputePermutation<DMatrixSparseCSC>(true,true) { // //@Override // public void process(DMatrixSparseCSC m) { // prow.reshape(m.numRows); // pcol.reshape(m.numCols); // fillSequence(prow); // fillSequence(pcol); // } //}; default: throw new InvalidOperationException("Unknown " + type); } }
public static LUSparseDecomposition_F64 <DMatrixSparseCSC> lu(FillReducing permutation) { ComputePermutation <DMatrixSparseCSC> cp = FillReductionFactory_DSCC.create(permutation); return(new LuUpLooking_DSCC(cp)); }
public static QRSparseDecomposition <DMatrixSparseCSC> qr(FillReducing permutation) { ComputePermutation <DMatrixSparseCSC> cp = FillReductionFactory_DSCC.create(permutation); return(new QrLeftLookingDecomposition_DSCC(cp)); }