cagpjax.solvers.base
Base classes for linear solvers and methods.
AbstractLinearSolver
Bases: Module
Base class for linear solvers.
These solvers are used to exactly or approximately solve the linear system \(Ax = b\) for \(x\), where \(A\) is a positive (semi-)definite (PSD) linear operator.
Solvers should always be constructed by a AbstractLinearSolverMethod
.
Source code in src/cagpjax/solvers/base.py
inv_congruence_transform(B)
abstractmethod
Compute the inverse congruence transform \(B^T x\) for \(x\) in \(Ax = B\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
B
|
LinearOperator | Float[Array, 'N K']
|
Linear operator or array to be applied. |
required |
Returns:
Type | Description |
---|---|
LinearOperator | Float[Array, 'K K']
|
Linear operator or array resulting from the congruence transform. |
Source code in src/cagpjax/solvers/base.py
inv_quad(b)
Compute the inverse quadratic form \(b^T x\), for \(x\) in \(Ax = b\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
b
|
Float[Array, N]
|
Right-hand side of the linear system. |
required |
Source code in src/cagpjax/solvers/base.py
logdet()
abstractmethod
solve(b)
abstractmethod
Compute a solution to the linear system \(Ax = b\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
b
|
Float[Array, N]
|
Right-hand side of the linear system. |
required |
trace_solve(B)
abstractmethod
Compute \(\mathrm{trace}(X)\) in \(AX=B\) for PSD \(B\).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
B
|
Self
|
An |
required |
Source code in src/cagpjax/solvers/base.py
AbstractLinearSolverMethod
Bases: Module
Base class for linear solver methods.
These methods are used to construct AbstractLinearSolver
instances.