cr.sparse.lop.Operator¶
- class cr.sparse.lop.Operator(times: Callable[[jax.Array], jax.Array], trans: Callable[[jax.Array], jax.Array], shape: Tuple[int, int], linear: bool = True, jit_safe: bool = True, matrix_safe: bool = True, real: bool = True)[source]¶
Represents a finite linear operator \(T : A -> B\) where \(A\) and \(B\) are finite vector spaces.
- Parameters
times – A function implementing \(T(x)\)
trans – A function implementing \(T^H (x)\)
m – The dimension of the destination vector space \(B\)
n – The dimension of the source vector space \(A\)
linear – Indicates if the operator is linear or not
jit_safe – Indicates if the operator can be safely JIT compiled
matrix_safe – Indicates if the operator can accept a matrix of vectors
real – Indicates if a linear operator is real i.e. has a matrix representation of real numbers
Note
While most of the operators in the library are linear operators, some are not. Prominent examples include operators like real part operator, imaginary part operator. These operators are provided for convenience.
Most operators in this collection are real.
Attributes
input_ndim
Returns the number of dimensions of input to the operator
input_shape
Returns the shape of input to the operator as a tuple
input_size
Returns the size of input to the operator
jit_safe
Indicates if the times and trans functions can be safely jit compiled
linear
Indicates if the operator is linear or not
matrix_safe
Indicates if the operator can accept a matrix of vectors
output_ndim
Returns the number of dimensions of output of the operator
output_shape
Returns the shape of output of the operator as a tuple
output_size
Returns the size of output of the operator
real
Indicates if a linear operator is real i.e. has a matrix representation of real numbers.
shape
Dimension of the linear operator (m, n)
times
A linear function mapping from A to B
trans
Corresponding adjoint linear function mapping from B to A