ScalingOperator¶
- class odl.operator.default_ops.ScalingOperator(*args, **kwargs)[source]¶
Bases:
Operator
Operator of multiplication with a scalar.
Implements:
ScalingOperator(s)(x) == s * x
- Attributes:
adjoint
Adjoint, given as scaling with the conjugate of the scalar.
domain
Set of objects on which this operator can be evaluated.
inverse
Return the inverse operator.
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.
scalar
Fixed scaling factor of this operator.
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__(domain, scalar)[source]¶
Initialize a new instance.
- Parameters:
- domain
LinearSpace
orField
Set of elements on which this operator acts.
- scalar
domain.field
element Fixed scaling factor of this operator.
- domain
Examples
>>> r3 = odl.rn(3) >>> vec = r3.element([1, 2, 3]) >>> out = r3.element() >>> op = ScalingOperator(r3, 2.0) >>> op(vec, out) # In-place, Returns out rn(3).element([ 2., 4., 6.]) >>> out rn(3).element([ 2., 4., 6.]) >>> op(vec) # Out-of-place rn(3).element([ 2., 4., 6.])