OperatorSum¶
- class odl.operator.operator.OperatorSum(*args, **kwargs)[source]¶
Bases:
OperatorExpression type for the sum of operators.
OperatorSum(left, right)(x) == left(x) + right(x)The sum is only well-defined for
Operatorinstances whereOperator.rangeis aLinearSpace.- 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.leftThe left/first part of this sum.
rangeSet in which the result of an evaluation of this operator lies.
rightThe left/second part of this sum.
Methods
__call__(x[, out])Return
self(x[, out, **kwargs]).derivative(x)Return the operator derivative at
x.norm([estimate])Return the operator norm of this operator.
- __init__(left, right, tmp_ran=None, tmp_dom=None)[source]¶
Initialize a new instance.
- Parameters:
- left
Operator First summand. Its
Operator.rangemust be aLinearSpaceorField.- right
Operator Second summand. Must have the same
Operator.domainandOperator.rangeasleft.- tmp_ran
Operator.rangeelement, optional Used to avoid the creation of a temporary when applying the operator.
- tmp_dom
Operator.domainelement, optional Used to avoid the creation of a temporary when applying the operator adjoint.
- left
Examples
>>> r3 = odl.rn(3) >>> op = odl.IdentityOperator(r3) >>> x = r3.element([1, 2, 3]) >>> out = r3.element() >>> OperatorSum(op, op)(x, out) # In-place, returns out rn(3).element([ 2., 4., 6.]) >>> out rn(3).element([ 2., 4., 6.]) >>> OperatorSum(op, op)(x) rn(3).element([ 2., 4., 6.])