FunctionalLeftVectorMult

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

Bases: Operator

Expression type for the functional left vector multiplication.

A functional is an Operator whose Operator.range is a Field. It is multiplied from left with a LinearSpaceElement, resulting in an operator mapping from the Operator.domain to the element’s LinearSpaceElement.space.

FunctionalLeftVectorMult(op, y)(x) == y * op(x)

__init__(functional, vector)[source]

Initialize a new instance.

Parameters

functionalOperator

Functional in the vector multiplication. Its range must be a Field.

vectorfunctional.range element-like

The element to multiply with. Its space’s LinearSpace.field must be the same as functional.range.

Examples

Create the operator (y * y^T)(x) = y * <x, y>

>>> space = odl.rn(3)
>>> y = space.element([1, 2, 3])
>>> functional = odl.InnerProductOperator(y)
>>> left_mul_op = FunctionalLeftVectorMult(functional, y)
>>> left_mul_op([1, 2, 3])
rn(3).element([ 14.,  28.,  42.])