LinCombOperator¶
-
class
odl.operator.default_ops.
LinCombOperator
(*args, **kwargs)[source]¶ Bases:
odl.operator.operator.Operator
Operator mapping two space elements to a linear combination.
Implements:
LinCombOperator(a, b)([x, y]) == a * x + b * y
- Attributes
adjoint
Adjoint of this operator (abstract).
domain
Set of objects on which this operator can be evaluated.
inverse
Return the operator inverse.
is_functional
True
if this operator’s range is aField
.is_linear
True
if this operator is linear.range
Set in which the result of an evaluation of this operator lies.
Methods
_call
(self, x[, out])Linearly combine
x
and write toout
if given.derivative
(self, point)Return the operator derivative at
point
.norm
(self[, estimate])Return the operator norm of this operator.
-
__init__
(self, space, a, b)[source]¶ Initialize a new instance.
- Parameters
- space
LinearSpace
Space of elements which the operator is acting on.
- a, b
space.field
elements 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.])