/** * Only converts the B matrix and passes that onto solve. Te result is then copied into * the input 'X' matrix. * * @param B A matrix ℜ <sup>m × p</sup>. Not modified. * @param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified. */ public override void solve(FMatrixRMaj B, FMatrixRMaj X) { blockB.reshape(B.numRows, B.numCols, false); MatrixOps_FDRB.convert(B, blockB); // since overwrite B is true X does not need to be passed in alg.solve(blockB, null); MatrixOps_FDRB.convert(blockB, X); }
public virtual /**/ double quality() { return(alg.quality()); } /** * Converts B and X into block matrices and calls the block matrix solve routine. * * @param B A matrix ℜ <sup>m × p</sup>. Not modified. * @param X A matrix ℜ <sup>n × p</sup>, where the solution is written to. Modified. */ public virtual void solve(FMatrixRMaj B, FMatrixRMaj X) { blockB.reshape(B.numRows, B.numCols, false); blockX.reshape(X.numRows, X.numCols, false); MatrixOps_FDRB.convert(B, blockB); alg.solve(blockB, blockX); MatrixOps_FDRB.convert(blockX, X); }
public virtual FMatrixRMaj getT(FMatrixRMaj T) { FMatrixRBlock T_block = ((CholeskyOuterForm_FDRB)alg).getT(null); if (T == null) { T = new FMatrixRMaj(T_block.numRows, T_block.numCols); } MatrixOps_FDRB.convert(T_block, T); // todo set zeros return(T); }
//@Override public FMatrixRMaj getR(FMatrixRMaj R, bool compact) { FMatrixRBlock Rblock; Rblock = ((QRDecompositionHouseholder_FDRB)alg).getR(null, compact); if (R == null) { R = new FMatrixRMaj(Rblock.numRows, Rblock.numCols); } MatrixOps_FDRB.convert(Rblock, R); return(R); }