ScalingOperator

class odl.operator.default_ops.ScalingOperator(*args, **kwargs)[source]

Bases: odl.operator.operator.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 a Field.

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(self, x[, out])

Scale x and write to out if given.

derivative(self, point)

Return the operator derivative at point.

norm(self[, estimate])

Return the operator norm of this operator.

__init__(self, domain, scalar)[source]

Initialize a new instance.

Parameters
domainLinearSpace or Field

Set of elements on which this operator acts.

scalardomain.field element

Fixed scaling factor of this operator.

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.])