Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 2.32 KB

File metadata and controls

81 lines (58 loc) · 2.32 KB

Linear operators

We often talk about solving a linear system $Ax = b$, where $A \in \mathbb{R}^{n \times m}$ is a matrix, $b \in \mathbb{R}^n$ is a vector, and $x \in \mathbb{R}^m$ is our desired solution.

The linear operators described on this page are ways of describing the matrix $A$. The simplest is [lineax.MatrixLinearOperator][], which simply holds the matrix $A$ directly.

Meanwhile if $A$ is diagonal, then there is also [lineax.DiagonalLinearOperator][]: for efficiency this only stores the diagonal of $A$.

Or, perhaps we only have a function $F : \mathbb{R}^m \to \mathbb{R}^n$ such that $F(x) = Ax$. Whilst we could use $F$ to materialise the whole matrix $A$ and then store it in a [lineax.MatrixLinearOperator][], that may be very memory intensive. Instead, we may prefer to use [lineax.FunctionLinearOperator][]. Many linear solvers (e.g. [lineax.CG][]) only use matrix-vector products, and this means we can avoid ever needing to materialise the whole matrix $A$.

??? abstract "lineax.AbstractLinearOperator"

::: lineax.AbstractLinearOperator
    options:
        members:
            - mv
            - as_matrix
            - transpose
            - H
            - in_structure
            - out_structure
            - in_size
            - out_size

::: lineax.MatrixLinearOperator options: members: - init


::: lineax.PyTreeLinearOperator options: members: - init


::: lineax.JacobianLinearOperator options: members: - init


::: lineax.FunctionLinearOperator options: members: - init

Structured linear operators

These operators represent matrices with a particular structure, storing only the nonzero entries (for memory efficiency) and using a specialised matrix-vector product (for speed).

::: lineax.IdentityLinearOperator options: members: - init


::: lineax.DiagonalLinearOperator options: members: - init


::: lineax.TridiagonalLinearOperator options: members: - init

Wrapper linear operators

These operators wrap another operator to attach extra information.

::: lineax.TaggedLinearOperator options: members: - init