Skip to content

tenzr::scipy::linalg

Functions

Name
TENZR_APIArray Det(const Array & A)
TENZR_APIArray Inv(const Array & A)
TENZR_APIArray Solve(const Array & A, const Array & b)
TENZR_APIArray Cholesky(const Array & A, bool lower =true)

Functions Documentation

function Det

TENZR_APIArray Det(
    const Array & A
)

Parameters:

  • A The input matrix.
  • A Rank-2 square matrix.

Return:

  • The determinant.
  • Scalar determinant.

Computes the determinant of a square matrix. Determinant of a square matrix, computed on the host via Eigen.

function Inv

TENZR_APIArray Inv(
    const Array & A
)

Parameters:

  • A The input matrix.
  • A Rank-2 square matrix.

Return:

  • The inverse matrix.
  • The matrix inverse.

Computes the inverse of a square matrix. Inverse of a square matrix, computed on the host via Eigen.

function Solve

TENZR_APIArray Solve(
    const Array & A,
    const Array & b
)

Parameters:

  • A The coefficient matrix.
  • b The right-hand side.
  • A Rank-2 square matrix.
  • b Rank-1 right-hand side.

Return:

  • The solution x.
  • The solution vector x.

Solves the linear system A x = b. Solve A x = b for a 1-D right-hand side, using a QR factorization on the host.

function Cholesky

TENZR_APIArray Cholesky(
    const Array & A,
    bool lower =true
)

Parameters:

  • A The input matrix.
  • lower Whether to return the lower (or upper) triangular factor.
  • A Rank-2 symmetric positive-definite matrix.
  • lower Select the lower (L) factor when true, the upper (U) otherwise.

Return:

  • The triangular factor.
  • The requested triangular factor.

Computes the Cholesky decomposition of a symmetric positive-definite matrix. Cholesky factorization of a positive-definite matrix.