OperatorRightScalarMult

class odl.OperatorRightScalarMult(*args, **kwargs)

Bases: Operator

Expression type for the operator right scalar multiplication.

OperatorRightScalarMult(op, s) == op(s * x)

The scalar multiplication is well-defined only if op.domain is a LinearSpace.

__init__(operator: Operator, scalar, tmp=None)[source]

Initialize a new OperatorLeftScalarMult instance.

Parameters

operatorOperator

Operator in the scalar multiplication. Its domain must be a LinearSpace or Field.

scalaroperator.range.field element

A real or complex number, depending on the field of the operator domain.

tmpdomain element, optional

Used to avoid the creation of a temporary when applying the operator.

Examples

>>> space = odl.rn(3)
>>> operator = odl.IdentityOperator(space)
>>> left_mul_op = OperatorRightScalarMult(operator, 3)
>>> left_mul_op([1, 2, 3])
rn(3).element([ 3.,  6.,  9.])