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

    Function qrQty

    • Computes t(Q) %*% y for a vector y. Equivalent to R's qr.qty().

      Parameters

      • q: QR

        A QR decomposition from qr.

      • y: readonly number[] | Float64Array<ArrayBufferLike>

        A vector with as many elements as the decomposed matrix has rows.

      Returns number[]

      t(Q) %*% y as a vector.

      const q = qr([[3, 0], [4, 5]]);
      qrQty(q, [3, 4]); // [-5, 0]
    • Computes t(Q) %*% y for a matrix y.

      Parameters

      • q: QR

        A QR decomposition from qr.

      • y: MatrixInput

        A matrix (array of rows) with as many rows as the decomposed matrix.

      Returns number[][]

      t(Q) %*% y as an array of rows.

    • Computes t(Q) %*% y.

      Parameters

      • q: QR

        A QR decomposition from qr.

      • y: VectorOrMatrix

        A vector or a matrix with as many rows as the decomposed matrix.

      Returns number[] | number[][]

      A vector if y is a vector, otherwise an array of rows.