LinCombOperator¶
- class odl.operator.default_ops.LinCombOperator(*args, **kwargs)[source]¶
Bases:
OperatorOperator mapping two space elements to a linear combination.
Implements:
LinCombOperator(a, b)([x, y]) == a * x + b * y
- Attributes:
adjointAdjoint of this operator (abstract).
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.rangeSet in which the result of an evaluation of this operator lies.
Methods
__call__(x[, out])Return
self(x[, out, **kwargs]).derivative(point)Return the operator derivative at
point.norm([estimate])Return the operator norm of this operator.
- __init__(space, a, b)[source]¶
Initialize a new instance.
- Parameters:
- space
LinearSpace Space of elements which the operator is acting on.
- a, b
space.fieldelements Scalars to multiply
x[0]andx[1]with, respectively.
- space
Examples
>>> r3 = odl.rn(3) >>> r3xr3 = odl.ProductSpace(r3, r3) >>> xy = r3xr3.element([[1, 2, 3], [1, 2, 3]]) >>> z = r3.element() >>> op = LinCombOperator(r3, 1.0, 1.0) >>> op(xy, out=z) # Returns z rn(3).element([ 2., 4., 6.]) >>> z rn(3).element([ 2., 4., 6.])