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

    Function qrQy

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

      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[]

      Q %*% y as a vector.

      const q = qr([[3, 0], [4, 5]]);
      qrQy(q, [-5, 0]); // [3, 4]
    • Computes 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[][]

      Q %*% y as an array of rows.

    • Computes 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.