ProductSpaceOperator
- class odl.ProductSpaceOperator(*args, **kwargs)
Bases:
OperatorA “matrix of operators” on product spaces.
For example a matrix of operators can act on a vector by
ProductSpaceOperator([[A, B], [C, D]])([x, y]) = [A(x) + B(y), C(x) + D(y)]Notes
This is intended for the case where an operator can be decomposed as a linear combination of “sub-operators”, e.g.

Mathematically, a
ProductSpaceOperatoris an operator
between product spaces
and
which can be written in the form
with component operators
.Its action on a vector
is defined as
the matrix multiplication![[\mathcal{A}(x)]_i = \sum_{j=1}^m \mathcal{A}_{ij}(x_j).](../_images/math/b1f25bce1211b77cd3d6afdc05fa2bc3087bb92f.png)
See Also
BroadcastOperator : Case when a single argument is used by several ops. ReductionOperator : Calculates sum of operator results. DiagonalOperator : Case where the ‘matrix’ is diagonal.
- __init__(operators, domain=None, range=None)[source]
Initialize a new instance.
Parameters
- operators
array-like An array of
Operator’s, must be 2-dimensional.- domain
ProductSpace, optional Domain of the operator. If not provided, it is tried to be inferred from the operators. This requires each column to contain at least one operator.
- range
ProductSpace, optional Range of the operator. If not provided, it is tried to be inferred from the operators. This requires each row to contain at least one operator.
Examples
>>> r3 = odl.rn(3) >>> pspace = odl.ProductSpace(r3, r3) >>> I = odl.IdentityOperator(r3) >>> x = pspace.element([[1, 2, 3], ... [4, 5, 6]])
Create an operator that sums two inputs:
>>> prod_op = odl.ProductSpaceOperator([[I, I]]) >>> prod_op(x) ProductSpace(rn(3), 1).element([ [ 5., 7., 9.] ])
Diagonal operator – 0 or
Nonemeans ignore, or the implicit zero operator:>>> prod_op = odl.ProductSpaceOperator([[I, 0], ... [0, I]]) >>> prod_op(x) ProductSpace(rn(3), 2).element([ [ 1., 2., 3.], [ 4., 5., 6.] ])
If a column is empty, the operator domain must be specified. The same holds for an empty row and the range of the operator:
>>> prod_op = odl.ProductSpaceOperator([[I, 0], ... [I, 0]], domain=r3 ** 2) >>> prod_op(x) ProductSpace(rn(3), 2).element([ [ 1., 2., 3.], [ 1., 2., 3.] ]) >>> prod_op = odl.ProductSpaceOperator([[I, I], ... [0, 0]], range=r3 ** 2) >>> prod_op(x) ProductSpace(rn(3), 2).element([ [ 5., 7., 9.], [ 0., 0., 0.] ])
- operators