BroadcastOperator¶
- class odl.operator.pspace_ops.BroadcastOperator(*args, **kwargs)[source]¶
Bases:
OperatorBroadcast argument to set of operators.
An argument is broadcast by evaluating several operators in the same point:
BroadcastOperator(op1, op2)(x) = [op1(x), op2(x)]
See also
ProductSpaceOperatorMore general case, used as backend.
ReductionOperatorCalculates sum of operator results.
DiagonalOperatorCase where each operator should have its own argument.
- Attributes:
adjointAdjoint of this operator.
domainSet of objects on which this operator can be evaluated.
inverseReturn the operator inverse.
is_functionalTrueif this operator's range is aField.is_linearTrueif this operator is linear.operatorsTuple of sub-operators that comprise
self.prod_opProductSpaceOperatorimplementation.rangeSet in which the result of an evaluation of this operator lies.
sizeTotal number of sub-operators.
Methods
__call__(x[, out])Return
self(x[, out, **kwargs]).derivative(x)Derivative of the broadcast operator.
norm([estimate])Return the operator norm of this operator.
- __init__(*operators)[source]¶
Initialize a new instance
- Parameters:
Examples
Initialize an operator:
>>> I = odl.IdentityOperator(odl.rn(3)) >>> op = BroadcastOperator(I, 2 * I) >>> op.domain rn(3) >>> op.range ProductSpace(rn(3), 2)
Evaluate the operator:
>>> x = [1, 2, 3] >>> op(x) ProductSpace(rn(3), 2).element([ [ 1., 2., 3.], [ 2., 4., 6.] ])
Can also initialize by calling an operator repeatedly:
>>> I = odl.IdentityOperator(odl.rn(3)) >>> op = BroadcastOperator(I, 2) >>> op.operators (IdentityOperator(rn(3)), IdentityOperator(rn(3)))