rStats.js v1.3.0
    Preparing search index...

    Function qrX

    • Reconstructs the original matrix from a QR decomposition, with columns back in their original order. Equivalent to R's qr.X().

      If the decomposition was pivoted, ncol smaller than the number of columns is an error (as in R).

      Parameters

      • q: QR

        A QR decomposition from qr.

      • options: { complete?: boolean; ncol?: number } = {}

        complete: whether the default ncol is the number of rows (true) or min(nrow, ncol) (false, the default). ncol: the number of columns to return, from 0 to max(nrow, ncol); columns beyond the original ones are taken from Q (as in R). A larger ncol is an error (R pads zero columns).

      Returns number[][]

      The reconstructed matrix as an array of rows.

      qrX(qr([[3, 0], [4, 5]])); // [[3, 0], [4, 5]]