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

    Function chol2inv

    • Inverse of a matrix from its Cholesky factor: computes (t(R) R)^-1. Equivalent to R's chol2inv().

      Only the upper triangle of the top-left size x size block of x is used. Throws if a diagonal element is zero.

      Parameters

      • x: readonly number[] | Float64Array<ArrayBufferLike> | MatrixInput

        The upper triangular Cholesky factor R (array of rows), e.g. from chol. A vector is treated as a one-column matrix.

      • options: Chol2InvOptions = {}

      Returns number[][]

      The symmetric inverse matrix (size x size) as an array of rows.

      chol2inv([[2, 1], [0, 1]]); // [[0.5, -0.5], [-0.5, 1]]