Beispiel #1
0
        public virtual bool decompose(DMatrixRMaj orig)
        {
            if (!decompQRP.decompose(orig))
            {
                return(false);
            }

            m   = orig.numRows;
            n   = orig.numCols;
            min = Math.Min(m, n);
            B.reshape(min, n, false);

            decompQRP.getR(B, true);

            // apply the column pivots.
            // TODO this is horribly inefficient
            DMatrixRMaj result = new DMatrixRMaj(min, n);
            DMatrixRMaj P      = decompQRP.getColPivotMatrix(null);

            CommonOps_DDRM.multTransB(B, P, result);
            B.set(result);

            return(decompBi.decompose(B));
        }