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

    Function forwardsolve

    • Solves the triangular system l y = x with a vector right-hand side. Equivalent to R's forwardsolve().

      Only the top-left k x k triangle of l (lower by default) and the first k elements of x are used. Throws if a diagonal element is exactly zero.

      Parameters

      Returns number[]

      The solution y, a vector of length k.

      forwardsolve([[2, 0], [1, 4]], [4, 10]); // [2, 2]
      
    • Solves the triangular system l y = x with a matrix right-hand side.

      Parameters

      Returns number[][]

      The solution y, a matrix with k rows.

    • Solves the triangular system l y = x.

      Parameters

      Returns number[] | number[][]

      A vector if x is a vector, otherwise a matrix with k rows.