Skip to content

Operations

Linear algebra operations for GPJax LinearOperators.

lower_cholesky

lower_cholesky(A: LinearOperator) -> LinearOperator

Compute the lower Cholesky decomposition of a positive semi-definite operator.

This function dispatches on the type of the input LinearOperator to provide efficient implementations for different operator structures.

Parameters:

Returns:

  • LinearOperator –

    The lower triangular Cholesky factor L such that A = L @ L.T.

solve

solve(
    A: LinearOperator,
    b: Float[Array, " N"] | Float[Array, " N M"],
) -> Float[Array, " N"] | Float[Array, " N M"]

Solve the linear system A @ x = b for x.

This function dispatches on the type of the input LinearOperator to provide efficient implementations for different operator structures.

Parameters:

  • A (LinearOperator) –

    A LinearOperator representing the matrix A.

  • b (Float[Array, ' N'] | Float[Array, ' N M']) –

    The right-hand side vector or matrix.

Returns:

  • Float[Array, ' N'] | Float[Array, ' N M'] –

    The solution x to the linear system.

logdet

logdet(A: LinearOperator) -> ScalarFloat

Compute the log-determinant of a linear operator.

This function dispatches on the type of the input LinearOperator to provide efficient implementations for different operator structures.

Parameters:

Returns:

  • ScalarFloat –

    The log-determinant of A.

diag

diag(A: LinearOperator) -> Float[Array, ' N']

Extract the diagonal of a linear operator.

This function dispatches on the type of the input LinearOperator to provide efficient implementations for different operator structures.

Parameters:

Returns:

  • Float[Array, ' N'] –

    The diagonal elements of A as a 1D array.